Except it doesn't. For some reason it won't find the resources correctly unless run from the same directory. So yes, the 'cd' is necessary.
# set current directory to the directory # of this file # like this, modRana can be run from an absolute path # eq.: ./opt/modrana/modrana.py -u QML -d n9 import os os.chdir(os.path.dirname(os.path.abspath(__file__)))