Ask coding questions

← Back to all posts
Import a py file into the main file using python 2.7
wslade (0)

I don't seem to be able to import .py into my main.py anymore. This used to work. Now I get an error Has something changed?

Comments
hotnewtop
RYANTADIPARTHI (6000)

python 2.7 is outdated. Try using your same code in python 3.8. The latest version. It will work then.