d49d8ac2133b40576618d1949bd1b3c4b6f8af53
[minwii.git] / src / app / startlogreader.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """
4 lancement du lecteur de fichier de log minwii
5
6 $Id$
7 $URL$
8 """
9 from os.path import realpath, sep
10 import sys
11
12
13 def main() :
14 from optparse import OptionParser
15 import pygame
16 from logfilereader import LogFilePlayer
17
18 usage = "%prog logfile"
19 op = OptionParser(usage)
20 options, args = op.parse_args()
21 if len(args) != 1 :
22 op.error("incorrect number of arguments")
23
24
25 pygame.init()
26 lfp = LogFilePlayer(args[0])
27 lfp.run()
28 pygame.quit()
29
30
31 # lr = LogFileReader(args[0])
32 #
33 # print lr.getSongFile()
34 #
35
36
37 if __name__ == "__main__" :
38 minwiipath = realpath(__file__).split(sep)
39 minwiipath = minwiipath[:-2]
40 minwiipath = sep.join(minwiipath)
41 sys.path.insert(1, minwiipath)
42 main()