Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   changing directories from within the shell (http://www.velocityreviews.com/forums/t330529-changing-directories-from-within-the-shell.html)

Darren Dale 05-03-2004 01:27 PM

changing directories from within the shell
 
I am sure this has been covered in the documentation, but I havent found
it. Could anyone tell me how to change directories from within the
python shell?

Thanks

Andrew Wilkinson 05-03-2004 01:36 PM

Re: changing directories from within the shell
 
Darren Dale wrote:

> I am sure this has been covered in the documentation, but I havent found
> it. Could anyone tell me how to change directories from within the
> python shell?
>
> Thanks


import os
os.chdir("newpath")

http://www.python.org/doc/current/lib/os-file-dir.html

HTH,
Andrew

Daniel 'Dang' Griffith 05-04-2004 12:48 PM

Re: changing directories from within the shell
 
On Mon, 3 May 2004 09:27:09 -0400, Darren Dale <dd55@cornell.edu>
wrote:

>I am sure this has been covered in the documentation, but I havent found
>it. Could anyone tell me how to change directories from within the
>python shell?


Or install IPython, and you can use "cd xyzzy", just like you were in
the usual command line shell. (And a whole lot more!)
Details available at: http://ipython.scipy.org/
--dang


All times are GMT. The time now is 04:12 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.