Thank you! It worked. On Fri, Oct 30, 2009 at 11:50 PM, Pramode C.E. <pramode...@yahoo.co.in>wrote:
> > > > > > os.system("cd Documents") # is not working :-( > > > > Can I override this? > > The current directory is a "per process" concept. > > If process A spawns process B and process B changes its current directory, > that does not in any way affect the current directory of A. > > The "system" function spawns the shell to execute the specified command - > doing a "cd" within the spawned shell doesn't change the current dir of the > Python process or any of the processes spawned in the future by Python > (including the next instance of the shell spawned by another invocation of > system). > > You might try something like the following: > > os.system("cd Documents; ls") > > Now "ls" will be done in the Documents folder because both commands are > executed by the same shell. > > > > > Connect more, do more and share more with Yahoo! India Mail. Learn > more. http://in.overview.mail.yahoo.com/ > _______________________________________________ > Discuss mailing list > Discuss@lists.fsugtsr.org > http://lists.fsugtsr.org/mailman/listinfo/discuss > -- Knowledge is free. Free means open source... http://opentechlab.blogspot.com
_______________________________________________ Discuss mailing list Discuss@lists.fsugtsr.org http://lists.fsugtsr.org/mailman/listinfo/discuss