Re: Py 3: Terminal script can't find relative path

2010-01-26 Thread Aahz
In article <98c70d6f-5872-436b-b160-01b39d17d...@a32g2000yqm.googlegroups.com>, Gnarlodious wrote: > >OK I guess that is normal, I fixed it with this: >path=os.path.dirname(__file__)+"/Data/" Use os.path.join() instead -- just in case you ever port to Windows -- Aahz (a...@pythoncraft.com)

Re: Py 3: Terminal script can't find relative path

2010-01-19 Thread Gnarlodious
OK I guess that is normal, I fixed it with this: path=os.path.dirname(__file__)+"/Data/" -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: Py 3: Terminal script can't find relative path

2010-01-19 Thread nn
On Jan 19, 8:03 am, Gnarlodious wrote: > On Jan 18, 4:21 pm, John Bokma wrote: > > > Gnarlodious writes: > > > I am running a script in a browser that finds the file in subfolder > > > Data: > > > > Content=Plist('Data/Content.plist') > > > > However, running the same script in Terminal errors:

Re: Py 3: Terminal script can't find relative path

2010-01-19 Thread Gnarlodious
On Jan 18, 4:21 pm, John Bokma wrote: > Gnarlodious writes: > > I am running a script in a browser that finds the file in subfolder > > Data: > > > Content=Plist('Data/Content.plist') > > > However, running the same script in Terminal errors: > > > IOError: [Errno 2] No such file or directory: 'D

Re: Py 3: Terminal script can't find relative path

2010-01-18 Thread John Bokma
Gnarlodious writes: > I am running a script in a browser that finds the file in subfolder > Data: > > Content=Plist('Data/Content.plist') > > However, running the same script in Terminal errors: > > IOError: [Errno 2] No such file or directory: 'Data/Content.plist' What does: ls -l Data/Content

Py 3: Terminal script can't find relative path

2010-01-18 Thread Gnarlodious
I am running a script in a browser that finds the file in subfolder Data: Content=Plist('Data/Content.plist') However, running the same script in Terminal errors: IOError: [Errno 2] No such file or directory: 'Data/Content.plist' Is Py 3 unable to find relative paths? I tried all kinds of trick