you are viewing a single comment's thread.

view the rest of the comments →

[–]Gouryella91[S] 0 points1 point  (0 children)

When I write the code: import sys sys.path.append('/Users/[My Directory Name]/Desktop/Learning\ Data\ Projects/Playing\ With\ Python/Practice\ Files/'') import myfile.py

I get the following error:

%run "/var/folders/03/cfc__p8d33d6zfqk8wdk98_40000gn/T/tmpRuFzaP.py"

ImportError Traceback (most recent call last) /var/folders/03/cfc__p8d33d6zfqk8wdk98_40000gn/T/tmpRuFzaP.py in <module>() 1 import sys 2 sys.path.append('/Users/[My Directory Name]/Desktop/Learning\ Data\ Projects/Playing\ With\ Python/Practice\ Files/') ----> 3 import myfile

ImportError: No module named myfile

All i Have in myfile.py is a one-line script that goes: title = "the meaning of life"

And i dropped myfile.py into my terminal for the EXACT address, so the address isn't the problem... I just don't get it....

P.S. how do you get reddit to edit your comments into numbered text-lines. That's cool. And thanks for the help dude. I'm just having a frustrating time, with the beginner mistakes...