tags:

views:

61

answers:

1

I run the command in IPython

cd $cs<TAB>

but it does not allow me to expand the path.

How can you make IPython to read shell variables?

+2  A: 

If i understand correctly what you mean by 'shell variables'. If you mean variables set in the shell ('environment variables'): you can read them with os.environ...

import os
cs = os.environ.get('cs')
runstring = "cd %s" (cs)
...
ChristopheD
Thank you for your answer!
Masi