Anki/anki
Timo Paulssen c17cec93aa Added a notification if the forms module is not generated yet.
This script should IMO not attempt to build the interface by itself, as
anki may be installed system-wide and the permissions wouldn't be enough.
2009-02-21 12:30:09 +01:00

31 lines
767 B
Python
Executable file

#!/usr/bin/env python
import os, sys
if __name__ == "__main__":
try:
modDir=os.path.dirname(os.path.abspath(__file__))
runningDir=os.path.split(modDir)[0]
except NameError:
# py2exe
runningDir=os.path.dirname(sys.argv[0])
modDir=runningDir
# set up paths for local development
sys.path.insert(0, os.path.join(modDir, "libanki"))
sys.path.insert(0, os.path.join(os.path.join(modDir, ".."), "libanki"))
import ankiqt
try:
import ankiqt.forms
except ImportError:
print
print "You need to run tools/build_ui.sh in order for anki to work."
print
raise
#import profile
#profile.run("ankiqt.run()", sort="cumulative")
ankiqt.run()