open file on mac
tinauser at libero.it
Fri Oct 8 16:16:13 CEST 2010
hi, sorry if it is a stupid qustio,but i cannot figure out where's the
i've a simpleModule:
print "the answer is ",num
#f = open("/Users/lguerrasio/myfold/initfile.py",'r')
f = open("initfile.py",'r')
print "The file does not exist, exiting gracefully"
print "This line will always print"
The module is located in the same folder of initfile.py
now,from terminal I import sys and add to the path the folder /Users/
lguerrasio/myfold; the I import the module and execute
on mac I get an error if i do not give the full path of initfile.py
(commented out in the code above);
on windows i did not have this problem.
Am I missing anything?
More information about the Python-list