Problem with creating python executor [duplicate]
I have created a FileManager for my personal files. The launcher for this manager is launched by following script.
#!/usr/bin/python
from ui.MovieManager import MovieManager
MovieManager().showView()
Movie manager and other modules are situated in the ui and core packages, but when executing the file as script, I do get following error.
vsd@homeworks:~/homework/ws-python/movie-database$ sh Launcher.py
from: can't read /var/mail/ui.MovieManager
I am not able to identify why this script is not picking up 开发者_开发问答MovieManager module under the current folder? However when I execute command python Launcher.py, It works well.
It's not python which generates the error.
Check this out:
blubb@nemo:~$ from ui.MovieManager import MovieManager
from: can't read /var/mail/ui.MovieManager
Mind you, this is the console, which is a logical consequence of you calling the script with sh Launcher.py. Instead, use ./Launcher.py. For this to work your file needs to be marked as executable, though.
Have you tried going to the folder where Launcher.py is and running
./Launcher.py
加载中,请稍侯......
精彩评论