Re: Files, directories and imports - relative to the current directory only

2008-03-25 Thread ptrk . mcm
On Mar 25, 11:27 am, ptn <[EMAIL PROTECTED]> wrote: > Hello, group. > > I can only read files and import modules that are in the same > directory > as the one my script is. Here is a test script (path.py): > > import os > import uno # some module I wrote > > print list(os.

Re: Files, directories and imports - relative to the current directory only

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 15:35:34 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: > ptn wrote: >> Traceback (most recent call last): >> File "path.py", line 4, in >> f = open('~/read/foo.txt') >> IOError: [Errno 2] No such file or >> directo

Re: Files, directories and imports - relative to the current directory only

2008-03-25 Thread Bjoern Schliessmann
ptn wrote: > Traceback (most recent call last): > File "path.py", line 4, in > f = open('~/read/foo.txt') > IOError: [Errno 2] No such file or > directory: '~/read/foo.txt' > [...] > So, what's wrong here? Maybe there's something I haven't set up

Files, directories and imports - relative to the current directory only

2008-03-25 Thread ptn
Hello, group. I can only read files and import modules that are in the same directory as the one my script is. Here is a test script (path.py): import os import uno # some module I wrote print list(os.walk('~/hacking/python')) f = open('~/read/foo.txt')