what's the command for (cd ..) in python
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Sep 9 09:03:10 EDT 2011
More information about the Python-list mailing list
Fri Sep 9 09:03:10 EDT 2011
- Previous message (by thread): what's the command for (cd ..) in python
- Next message (by thread): what's the command for (cd ..) in python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
kaustubh joshi wrote:
> Hello friends,
> How do we carry out the command "*cd ..*" in
> python?
import os
os.chdir('..')
But think carefully before doing this. Some functions may be confused if you
change directories while they are running. You may be better off staying in
the same directory, and adjusting the path names to the files as you work
with them.
--
Steven
- Previous message (by thread): what's the command for (cd ..) in python
- Next message (by thread): what's the command for (cd ..) in python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list