Re: Default path for files

2010-01-30 Thread Aahz
In article , Rotwang wrote: > >Hi all, can anybody tell me whether there's a way to change the default >location for files to be opened by open()? I'd like to be able to create >files somewhere other than my Python folder without having to write the >full path in the filename every time. Sorry

Re: Default path for files

2010-01-30 Thread Nobody
On Sun, 24 Jan 2010 15:08:15 +, Rotwang wrote: > Hi all, can anybody tell me whether there's a way to change the default > location for files to be opened by open()? I'd like to be able to create > files somewhere other than my Python folder without having to write the > full path in the filen

Re: Default path for files

2010-01-25 Thread Gabriel Genellina
En Sun, 24 Jan 2010 15:04:48 -0300, Günther Dietrich escribió: Rotwang wrote: Check out http://docs.python.org/library/os.html and the function chdir it is what you are looking for. Thank you. So would adding import os os.chdir() to site.py (or any other module which is automatically i

Re: Default path for files

2010-01-24 Thread Günther Dietrich
Rotwang wrote: >> Check out http://docs.python.org/library/os.html and the function >> chdir it is what you are looking for. > >Thank you. So would adding > >import os >os.chdir() > >to site.py (or any other module which is automatically imported during >initialisation) change the default locati

Re: Default path for files

2010-01-24 Thread Rotwang
Christian Heimes wrote: Rotwang wrote: import os os.chdir() to site.py (or any other module which is automatically imported during initialisation) change the default location to every time I used Python? First of all you shouldn't alter the site module ever! The optional sitecustomize modu

Re: Default path for files

2010-01-24 Thread Christian Heimes
Rotwang wrote: > import os > os.chdir() > > to site.py (or any other module which is automatically imported during > initialisation) change the default location to every time I used > Python? First of all you shouldn't alter the site module ever! The optional sitecustomize module exists to mak

Re: Default path for files

2010-01-24 Thread Rotwang
Krister Svanlund wrote: On Sun, Jan 24, 2010 at 4:08 PM, Rotwang wrote: Hi all, can anybody tell me whether there's a way to change the default location for files to be opened by open()? I'd like to be able to create files somewhere other than my Python folder without having to write the full p

Re: Default path for files

2010-01-24 Thread Krister Svanlund
On Sun, Jan 24, 2010 at 4:08 PM, Rotwang wrote: > Hi all, can anybody tell me whether there's a way to change the default > location for files to be opened by open()? I'd like to be able to create > files somewhere other than my Python folder without having to write the full > path in the filename

Default path for files

2010-01-24 Thread Rotwang
Hi all, can anybody tell me whether there's a way to change the default location for files to be opened by open()? I'd like to be able to create files somewhere other than my Python folder without having to write the full path in the filename every time. Sorry if this is a stupid question, I do