os.path.exists() error

Fredrik Lundh effbot at telia.com
Fri May 12 10:24:48 EDT 2000


Rob Elder <relder at omegabit.com> wrote:
> A file is created using (mac):
> 
> output = open('ArtEngine:Desktop Folder:testFile','w')
> ...
> output.close()
> 
> The file is created and is readable. Then using:
> 
> temp = os.path.exists('ArtEngine:Desktop Folder:testFile')
> 
> I would expect to get a logical response stored in "temp" but instead get
> a general interpreter error.

what's a "general interpreter error"?

if you got a NameError exception (NameError: os), you probably
just forgot to import the "os" module.

if you got any other exception, please post the full traceback.

</F>




More information about the Python-list mailing list