[IPython-user] Still trying to use pysh not-interactively
Florian Lindner
mailinglists@xgm...
Sun Mar 21 07:39:54 CDT 2010
Hello,
I want to use the convenient features of the pysh mode (SLists, executing with !) in a non-interactive script. However I don't figure out how to do so...
#!/usr/bin/ipython
import IPython.ipapi
ip = IPython.ipapi.get()
a=ip.system('ls')
print a
executes ls but a is None after wards. Additionally ipython displays its welcome message and exits to it own prompt.
#!/usr/bin/ipython
import ipy_profile_sh
a=!ls
gives an syntax error.
All I want to do is to use the ipython -profile sh in a script. Any way to do that?
Thanks,
Florian
More information about the IPython-user
mailing list