changing directories from within the shell

Discussion in 'Python' started by Darren Dale, May 3, 2004.

  1. Darren Dale

    Darren Dale Guest

    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
     
    Darren Dale, May 3, 2004
    #1
    1. Advertising

  2. 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
     
    Andrew Wilkinson, May 3, 2004
    #2
    1. Advertising

  3. 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
     
    Daniel 'Dang' Griffith, May 4, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joel Finkel
    Replies:
    0
    Views:
    511
    Joel Finkel
    Sep 12, 2003
  2. Jeffry van de Vuurst
    Replies:
    2
    Views:
    552
    Jeffry van de Vuurst
    Jul 30, 2003
  3. =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=

    Multiple bin-directories with virtual directories?

    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    844
    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=
    Nov 9, 2004
  4. Paul F
    Replies:
    4
    Views:
    651
    Mark Fitzpatrick
    Jun 25, 2008
  5. Adam Petrie
    Replies:
    8
    Views:
    338
    Adam Petrie
    Oct 11, 2004
Loading...

Share This Page