Anki/anki
Damien Elmes d948b00c54 start refactoring main window
- moved progress handling into separate progress.py
- moved deck browser code into separate deckbrowser.py
- started reworking the state code; views will be rolled into this in the
  future
- the main window has been stripped of the study options, inline editor,
  congrats screen and so on, and now consists of a single main widget which
  has a webview placed inside it. The stripped features will be implemented
  either in separate windows, or as part of the web view
2011-04-28 09:26:46 +09:00

26 lines
696 B
Python
Executable file

#!/usr/bin/env python
import os, sys
if __name__ == "__main__":
if sys.version_info[0] > 2:
raise Exception("Anki should be run with python2.x.")
try:
modDir=os.path.dirname(os.path.realpath(__file__))
runningDir=os.path.split(modDir)[0]
except NameError:
# py2exe
runningDir=os.path.dirname(sys.argv[0])
modDir=runningDir
sys.path.insert(0, os.path.join(modDir, "libanki"))
sys.path.insert(0, os.path.join(os.path.join(modDir, ".."), "libanki"))
import aqt
try:
import aqt.forms
except ImportError:
raise Exception("You need to run tools/build_ui.sh in order for anki to work.")
aqt.run()