mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00

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.
31 lines
767 B
Python
Executable file
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()
|