~facundo/enjuewemela/trunk

« back to all changes in this revision

Viewing changes to enjuewemela/main.py

  • Committer: facundo at com
  • Date: 2011-07-31 16:49:14 UTC
  • mfrom: (72.1.7 some-fixes)
  • Revision ID: facundo@taniquetil.com.ar-20110731164914-0at88mfphkmzshgk
Lot of small fixes, more internationalization, better configglue usage, enhanced code quality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#
9
9
"""Main program for the game."""
10
10
 
11
 
import sys, os
 
11
import os
 
12
import sys
12
13
 
13
14
BASEDIR = os.path.dirname(os.path.realpath(__file__))
14
15
sys.path.insert(0, os.path.join(BASEDIR, "cocos"))
34
35
import gettext
35
36
import os
36
37
 
 
38
 
37
39
def get_language():
38
40
    """Return the language to be used by the system.
39
41
 
68
70
print _("Using AVBin module:"), avbin
69
71
 
70
72
 
71
 
def start(dmenu=None, spec=None):
72
 
    gm = games.GameManager()
73
 
    sc = gm.start(dmenu, spec)
74
 
    director.run(sc)
75
 
 
76
 
 
77
 
if __name__ == "__main__":
 
73
def start():
78
74
    if len(sys.argv) == 3:
79
75
        dmenu = sys.argv[1]
80
76
        spec = sys.argv[2]
85
81
        dmenu = ""
86
82
        spec = None
87
83
 
88
 
    start(dmenu, spec)
 
84
    gm = games.GameManager()
 
85
    sc = gm.start(dmenu, spec)
 
86
    director.run(sc)