to fix error:
self.current_stage=import(file)
ImportError: Import by filename is not supported.
in stage.py,
change:
try:
if os.name=='nt': #hax for the fuckin winblowz users
exec "import stages.stage"+str(0)
self.current_stage=eval("stages.stage0")
else:
self.current_stage=__import__(file)
self.current_stage.start(self)
except:
import pylaga
pylaga.exception_handler()
sys.exit(1)
to:
try:
try:
self.current_stage=__import__(file)
except: # needed for newer versions of python 2
exec "import stages.stage"+str(0)
self.current_stage=eval("stages.stage0")
self.current_stage.start(self)
except:
import pylaga
pylaga.exception_handler()
sys.exit(1)
exceptions are
exceptions are a tool you can use to identify a problem, not something to hide--there are probably fewer places for a global exception handler. That is only needed if you know what problem it is and tried to solve it another way. However, you can still see unexpected types of exceptions if you specify which one you are handling, such as ImportError in this case (see below). If there is some other exception, the program will stop and show you the exception (just like you tried to do manually above):