Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > changing directories from within the shell

Reply
Thread Tools

changing directories from within the shell

 
 
Darren Dale
Guest
Posts: n/a
 
      05-03-2004
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
 
Reply With Quote
 
 
 
 
Andrew Wilkinson
Guest
Posts: n/a
 
      05-03-2004
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
 
Reply With Quote
 
 
 
 
Daniel 'Dang' Griffith
Guest
Posts: n/a
 
      05-04-2004
On Mon, 3 May 2004 09:27:09 -0400, 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?


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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Directories and Physical directories Paul M Fin MCAD 4 06-27-2008 07:50 PM
virtual directories/physical directories in IIS Paul F ASP .Net 4 06-25-2008 04:04 PM
Multiple bin-directories with virtual directories? =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?= ASP .Net 0 11-09-2004 05:49 PM
How to map Project directories to Production sub-directories Joel Finkel ASP .Net 0 09-12-2003 06:47 PM
Using virtual directories for common directories (scripts, images, styles, etc.) Jeffry van de Vuurst ASP .Net 2 07-30-2003 07:00 PM



Advertisments