Py 3: Terminal script can't find relative path

Aahz aahz at pythoncraft.com
Tue Jan 26 20:35:06 CET 2010


In article <98c70d6f-5872-436b-b160-01b39d17d270 at a32g2000yqm.googlegroups.com>,
Gnarlodious  <gnarlodious at gmail.com> 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 (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

import antigravity



More information about the Python-list mailing list