Re: [Tutor] referring to subfolders

2009-01-17 Thread Kent Johnson
On Sat, Jan 17, 2009 at 12:20 AM, Che M wrote: > import os.path > self.currentdir = os.curdir > self.mysubfolder = os.path.join(self.currentdir, "subfolder") > path = self.mysubfolder + '/myfile.py' > > Is this really the only way to do it,and so I have to import > os.path each time I have a case

Re: [Tutor] referring to subfolders

2009-01-16 Thread Che M
> Date: Fri, 16 Jan 2009 21:26:52 -0800 > From: st...@alchemy.com > To: pine...@hotmail.com > CC: tutor@python.org > Subject: Re: [Tutor] referring to subfolders > > Che M wrote: >> I have been using absolute paths in my progr

Re: [Tutor] referring to subfolders

2009-01-16 Thread Steve Willoughby
Che M wrote: I have been using absolute paths in my programs, but want to get out of the habit as I try to run them on other computers. I was surprised to find that this type of reference didn't work: path = '/subfolder/myfile.py' Pathnames are relative by default. So: 'myfile.py' would b