From: Kevin A. <ka...@us...> - 2004-05-20 18:35:54
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7683 Modified Files: model.py Log Message: added py2exe support to CustomDialog Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.176 retrieving revision 1.177 diff -C2 -d -r1.176 -r1.177 *** model.py 20 May 2004 18:32:11 -0000 1.176 --- model.py 20 May 2004 18:35:44 -0000 1.177 *************** *** 1134,1138 **** # a default based on the name if aDialogRsrc is None: ! filename = sys.modules[self.__class__.__module__].__file__ # chop the .pyc or .pyo from the end base, ext = os.path.splitext(filename) --- 1134,1148 ---- # a default based on the name if aDialogRsrc is None: ! if util.main_is_frozen(): ! # KEA 2004-05-20 ! # running standalone ! # need to support py2exe differently than bundlebuilder and mcmillan probably ! # but this is the py2exe 0.5 way ! # figure out the .rsrc.py filename based on the module name stored in library.zip ! filename = os.path.split(sys.modules[self.__class__.__module__].__file__)[1] ! filename = os.path.join(parent.application.applicationDirectory, filename) ! else: ! # figure out the .rsrc.py filename based on the module name ! filename = sys.modules[self.__class__.__module__].__file__ # chop the .pyc or .pyo from the end base, ext = os.path.splitext(filename) |