I got a text file and saved it in python25 (a folder) as .txt. I need to import this file and I am getting syntax error that file is not defined. I am a complete biology novice to defining and importing files. Please help!
huglybits
0
Newbie Poster
Recommended Answers
Jump to PostIf the file has Python code, then it should end with a ".py" not ".txt". If it is not a Python file, but a file with text you want to read in the program then you open the file and read it. See #6 here for how to open and …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.