转发:Re:how can I implement "cd" like shell in Python?

Chris Withers chris at python.org
Fri Jun 29 19:48:43 CEST 2012


On 28/06/2012 12:39, 梦幻草 wrote:
>
> thanks !But this method can not change the directory of the main
> process.For example:
> the current directory is "/home/work/local/scripts",this directory have
> a python script file "cd.py"
> after executing the script cd.py by "python cd.py ..",the current work
> directory has no changes,the path is still "/home/work/local/scripts"

Sounds like you might want to give the ipython shell a go, since it has 
a lot of this already implemented.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the Python-list mailing list