[IPython-User] CTRL commands for line editing in ipython

Ian Stokes-Rees ijstokes@hkl.hms.harvard....
Fri Jun 18 16:03:06 CDT 2010


I'm just ramping up my iPython expertise.  I'm surprised that some
commands I'd expect to work don't do anything (this is using ipythonx
from EPD on OS X 10.6):

CTRL-C: I would like this to cancel whatever I've currently written and
return me to the command prompt (like from bash)

CTRL-A: I would like this to go to the start of the command line.

CTRL-E: I would like this to go to the end of the command line.

Cool shell commands from inside a script: ipython gives me some great
interactive features for actions relating to the filesystem and shell
commands.  Is there some easy way to do the same thing in bash-like
python scripts?

Tab completion on file names in strings.  Maybe this is an unreasonable
expectation.  If I have a file named "foo.dat" in the current directory,
I can do:

fh = open(foo<TAB>)

and get auto-completion to form

fh = open(foo.dat)

but obviously that doesn't help me since I need to do:

fh = open('foo<TAB>

however this doesn't tab complete.  Perhaps there is some configuration
setting I need to change to fix this.

Thanks,

Ian

-- 
Ian Stokes-Rees, PhD                       W: http://hkl.hms.harvard.edu
ijstokes@hkl.hms.harvard.edu               T: +1 617 432-5608 x75
NEBioGrid, Harvard Medical School          C: +1 617 331-5993




More information about the IPython-User mailing list