Changing directory with a twist

Gordon McMillan gmcm at hypernet.com
Tue Mar 14 18:12:53 CET 2000


Oleg Broytmann wrote:

[Gaetan wants a "cd" within a script to affect the environment]

> On Tue, 14 Mar 2000, Gaetan Corneau wrote:
> > >    What OS? UNIX?
> > Sorry: NT and Linux
> 
>    Don't know anything about NT. On UNIX (Linux is UN*X too) you need to
> pass the name of directory back to shell, and the shell have to be prepared
> to get the name and chdir. Example:

Even worse on NT, because cmd is a lame excuse for a shell, 
and if your "cd" involves changing drives, that takes 2 shell 
commands.

- Gordon




More information about the Python-list mailing list