Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Changing the current directory

Reply
Thread Tools

Changing the current directory

 
 
vsoler
Guest
Posts: n/a
 
      11-15-2009
Ever since I installed my Python 2.6 interpreter, I've been saving my
*.py files in the C:\Program Files\Python26 directory, which is the
default directory for such files in my system.

However, I have realised that the above is not the best practice.
Therefore I created the C:\Program Files\Python26\test directory and I
want it to be my default directory for saving *.py files, importing
modules, etc.

I'd like to do something like the DOS equivalent of "CD test" but I
do not know kow to do it.

I am currently doing something really awful: I open a *.py file in the
est subdirectory, I run it with the F5 key and it works! but I am
doing really something stupid.

I can see that it works because if I do
 
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
Changing a shell's current directory with python Andy B. Python 4 01-30-2011 05:16 AM
Changing the current directory (full post) vsoler Python 8 11-16-2009 10:54 PM
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
Changing the program's current directory. Dave Rudolf Java 2 01-17-2007 12:42 AM
Re: Changing a shell's current directory with python Peter Hansen Python 1 12-19-2005 03:32 AM



Advertisments