On 03/16/2015 02:29 PM, Rajbir Singh wrote:
i need to know how i can set current working dir in an executing phython
using os module

os.chdir() will change the current directory, but it changes it for the whole program (all threads), and the change lasts till the program terminates.

Very often, one of these "buts" is a problem, so most people prefer to find a different way of solving the problem. I prefer to have a policy of never changing the current directory once started, and for all file names make them either relative to that original current directory, or just make them absolute.

There are a number of functions that let you manipulate the file name strings, mostly in os.path


--
DaveA
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to