Python 'cannot Import Name'
So i have structure like this And i want to import userlist.py from server.py. Server py: import socket from server import userlist #<-- error here class Server(): def _
Solution 1:
Try just
import userlist
When you are importing a file (module) in the same directory, all you need to do is import the name of that file without the .py
part.
Post a Comment for "Python 'cannot Import Name'"