Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Irunner #596

Merged
merged 2 commits into from

3 participants

@juliantaylor
Collaborator

commandline option overrides mode determined from file extension and minor documentation update

juliantaylor added some commits
@juliantaylor juliantaylor irunner: prefer command line option over extension for mode
closes gh-594
9ad1563
@juliantaylor juliantaylor irunner: doc update
add a sentence on purpose of irunner to manpage and update link
to origin
a55a9af
@takluyver
Owner

This makes sense, although since it's an API change, it may not land before 0.11. @minrk, @fperez: your call.

@fperez fperez merged commit 10c2367 into from
@fperez fperez referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 19, 2011
  1. @juliantaylor
  2. @juliantaylor

    irunner: doc update

    juliantaylor authored
    add a sentence on purpose of irunner to manpage and update link
    to origin
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 4 deletions.
  1. +4 −3 IPython/lib/irunner.py
  2. +3 −1 docs/man/irunner.1
View
7 IPython/lib/irunner.py
@@ -16,7 +16,7 @@
This is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s script
contributed on the ipython-user list:
-http://scipy.net/pipermail/ipython-user/2006-May/001705.html
+http://mail.scipy.org/pipermail/ipython-user/2006-May/003539.html
NOTES:
@@ -410,7 +410,6 @@ def main():
parser = optparse.OptionParser(usage=MAIN_USAGE)
newopt = parser.add_option
- parser.set_defaults(mode='ipython')
newopt('--ipython',action='store_const',dest='mode',const='ipython',
help='IPython interactive runner (default).')
newopt('--python',action='store_const',dest='mode',const='python',
@@ -430,7 +429,9 @@ def main():
modes = {'.ipy':'ipython',
'.py':'python',
'.sage':'sage'}
- mode = modes.get(ext,opts.mode)
+ mode = modes.get(ext,"ipython")
+ if opts.mode:
+ mode = opts.mode
runners[mode]().main(args)
if __name__ == '__main__':
View
4 docs/man/irunner.1
@@ -10,6 +10,8 @@
.SH DESCRIPTION
irunner is an interface to the various interactive runners
available in IPython's \fBirunner\fP module.
+It can used to run scripts as if they where typed up
+interactively.
.PP
The already implemented runners are listed below; adding
one for a new program is a trivial task, see the source
@@ -42,7 +44,7 @@ irunner.py \-\-ipython \-\- \-\-interact script.ipy
.SH AUTHOR
\fBirunner\fP is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s
script contributed on the ipython-user list:
-http://scipy.net/pipermail/ipython-user/2006-May/001705.html
+http://mail.scipy.org/pipermail/ipython-user/2006-May/003539.html
.PP
This manual page was written by Bernd Zeimetz <bernd@bzed.de>, for the Debian
project (but may be used by others). Modified by Fernando Perez
Something went wrong with that request. Please try again.