From: pin Date: Tue, 27 Jul 2010 08:44:45 +0000 (+0000) Subject: Quelques adaptations pour que ça compile avec Py2Exe. X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/commitdiff_plain/a07152998dd50dab4e31a809158b3f5b430ac094?ds=sidebyside;hp=d4b591abe110f8c546838449dad36351d223ee6c Quelques adaptations pour que ça compile avec Py2Exe. git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@293 fe552daf-6dbe-4428-90eb-1537e0879342 --- diff --git a/setup_win_exe.py b/setup_win_exe.py index 1aa2fb0..2e3cd98 100755 --- a/setup_win_exe.py +++ b/setup_win_exe.py @@ -155,17 +155,17 @@ class BuildExe: # targets to build windows = [{ - 'script': self.script, + 'script': "src/minwii/runminwii.py", 'icon_resources': [(0, self.icon_file)], 'copyright': self.copyright }, { 'script' : "src/minwii/logapp.py", - 'icon_resources': [(0, self.icon_file)] + 'icon_resources': [(0, self.icon_file)], 'copyright' : self.copyright } - ] - #console = [self.script], + ], + #console = ["src/minwii/logapp.py"], options = {'py2exe': {'optimize': 2, 'bundle_files': 3, #'compressed': True, diff --git a/src/minwii/loganalyse.py b/src/minwii/loganalyse.py index d6d5a4d..73581cb 100755 --- a/src/minwii/loganalyse.py +++ b/src/minwii/loganalyse.py @@ -6,9 +6,9 @@ $Id$ $URL$ """ -from logfilereader import LogFileReader +from minwii.logfilereader import LogFileReader from pprint import pprint -from musicxml import musicXml2Song +from minwii.musicxml import musicXml2Song from statlib import stats DEFAULT_STATS = ('geometricmean', diff --git a/src/minwii/logapp.py b/src/minwii/logapp.py index edc86e6..176d179 100755 --- a/src/minwii/logapp.py +++ b/src/minwii/logapp.py @@ -13,7 +13,7 @@ import os from os.path import join as pjoin from os.path import basename from os.path import getsize -from loganalyse import LogFileAnalyser +from minwii.loganalyse import LogFileAnalyser from pprint import pprint class Application(Frame) : diff --git a/src/minwii/logfilereader.py b/src/minwii/logfilereader.py index 648cdee..b7f84a1 100755 --- a/src/minwii/logfilereader.py +++ b/src/minwii/logfilereader.py @@ -6,6 +6,7 @@ $Id$ $URL$ """ +from types import StringTypes from widgets.playingscreen import PlayingScreenBase from eventutils import EventDispatcher from events import eventCodes @@ -34,7 +35,7 @@ class LogFileReader(object) : """ logfile : chemin d'accès au fichier de log MinWii. le format supporté est actuellement la version 1.0 uniquement. """ - if isinstance(logfile, str) : + if isinstance(logfile, StringTypes) : self.logfile = open(logfile, 'r') else : self.logfile = logfile