[IPython-user] exits to shell prompt

Fernando Perez Fernando.Perez at colorado.edu
Mon Sep 12 16:04:28 CDT 2005


Rakotomandimby Mihamina wrote:
> Hi,
> I dont understand why does ipython exits to the shell prompt after this
> 
> [....]
> In [4]: os.execl('/bin/ls','l')

Well, because that's what you told it to do:

In [2]: os.execl?
Type:           function
Base Class:     <type 'function'>
String Form:    <function execl at 0x4005b79c>
Namespace:      Interactive
File:           /usr/lib/python2.3/os.py
Definition:     os.execl(file, *args)
Docstring:
     execl(file, *args)

     Execute the executable file with argument list args, replacing the
     current process.


You just told it to cut the branch you were sitting on, and it dutifully obeyed.

Cheers,

f




More information about the IPython-user mailing list