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:
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.