skip wrote:
A simple script like the one below lets me jump through a directory
structure. However, if I run it from /this/directory and within it to go to
/a/totally/different/directory... I'm still actually going to be in
/this/directory when I exit the script. Is it possible to have a scri
In article <[EMAIL PROTECTED]>,
Nick Coghlan <[EMAIL PROTECTED]> wrote:
>The script is executed in a process separate from your command shell, and
>hence
>has no effect on your shell's current directory.
>
>There are some things that batch files and shell scripts are still good for -
>manipulat
The script is executed in a process separate from your command shell, and hence
has no effect on your shell's current directory.
There are some things that batch files and shell scripts are still good for -
manipulating the shell :)
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Br
Hmmm... I take it back... that is not working! I think it changes the
path only during execution time.
--
http://mail.python.org/mailman/listinfo/python-list
> /this/directory when I exit the script. Is it possible to have a
script
> that can drop me off into a different directory than where I
initiated it
> from?
Use os.chdir(newpath)
So, you can code os.chdir(r'/a/totally/different/directory') and find
yourself in /a/totally/different/directory aft
A simple script like the one below lets me jump through a directory
structure. However, if I run it from /this/directory and within it to go to
/a/totally/different/directory... I'm still actually going to be in
/this/directory when I exit the script. Is it possible to have a script
that can