##// END OF EJS Templates
Merge pull request #596 from juliantaylor/irunner...
Fernando Perez -
r4384:10c23676 merge
parent child Browse files
Show More
@@ -16,7 +16,7 b' simply run the module as a script:'
16 This is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s script
16 This is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s script
17 contributed on the ipython-user list:
17 contributed on the ipython-user list:
18
18
19 http://scipy.net/pipermail/ipython-user/2006-May/001705.html
19 http://mail.scipy.org/pipermail/ipython-user/2006-May/003539.html
20
20
21
21
22 NOTES:
22 NOTES:
@@ -410,7 +410,6 b' def main():'
410
410
411 parser = optparse.OptionParser(usage=MAIN_USAGE)
411 parser = optparse.OptionParser(usage=MAIN_USAGE)
412 newopt = parser.add_option
412 newopt = parser.add_option
413 parser.set_defaults(mode='ipython')
414 newopt('--ipython',action='store_const',dest='mode',const='ipython',
413 newopt('--ipython',action='store_const',dest='mode',const='ipython',
415 help='IPython interactive runner (default).')
414 help='IPython interactive runner (default).')
416 newopt('--python',action='store_const',dest='mode',const='python',
415 newopt('--python',action='store_const',dest='mode',const='python',
@@ -430,7 +429,9 b' def main():'
430 modes = {'.ipy':'ipython',
429 modes = {'.ipy':'ipython',
431 '.py':'python',
430 '.py':'python',
432 '.sage':'sage'}
431 '.sage':'sage'}
433 mode = modes.get(ext,opts.mode)
432 mode = modes.get(ext,"ipython")
433 if opts.mode:
434 mode = opts.mode
434 runners[mode]().main(args)
435 runners[mode]().main(args)
435
436
436 if __name__ == '__main__':
437 if __name__ == '__main__':
@@ -10,6 +10,8 b''
10 .SH DESCRIPTION
10 .SH DESCRIPTION
11 irunner is an interface to the various interactive runners
11 irunner is an interface to the various interactive runners
12 available in IPython's \fBirunner\fP module.
12 available in IPython's \fBirunner\fP module.
13 It can used to run scripts as if they where typed up
14 interactively.
13 .PP
15 .PP
14 The already implemented runners are listed below; adding
16 The already implemented runners are listed below; adding
15 one for a new program is a trivial task, see the source
17 one for a new program is a trivial task, see the source
@@ -42,7 +44,7 b' irunner.py \\-\\-ipython \\-\\- \\-\\-interact script.ipy'
42 .SH AUTHOR
44 .SH AUTHOR
43 \fBirunner\fP is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s
45 \fBirunner\fP is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s
44 script contributed on the ipython-user list:
46 script contributed on the ipython-user list:
45 http://scipy.net/pipermail/ipython-user/2006-May/001705.html
47 http://mail.scipy.org/pipermail/ipython-user/2006-May/003539.html
46 .PP
48 .PP
47 This manual page was written by Bernd Zeimetz <bernd@bzed.de>, for the Debian
49 This manual page was written by Bernd Zeimetz <bernd@bzed.de>, for the Debian
48 project (but may be used by others). Modified by Fernando Perez
50 project (but may be used by others). Modified by Fernando Perez
General Comments 0
You need to be logged in to leave comments. Login now