python 2.7 - ImportError: No module named if trying to execute from command line -


i getting following error

d:\pythongui>c:\python27\python.exe d:/pythongui/controller/maincontroller.py traceback (most recent call last): file "d:/pythongui/controller/maincontroller.py", line 5, in <module> view.mainview import launcher importerror: no module named view.mainview 

when executing following command in terminal

c:\python27\python.exe d:/pythongui/controller/maincontroller.py 

but same code working in pycharm without error.

my directory structure follows :

enter image description here

i have tried following code

import getmyip getmyip import sys sys.path.append("view/mainview") import server server import view.mainview 


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -