From: Kevin A. <ka...@us...> - 2004-05-20 18:16:20
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3662 Modified Files: model.py Log Message: updated childWindow resource loading to better support standalones Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -d -r1.174 -r1.175 *** model.py 13 May 2004 17:53:58 -0000 1.174 --- model.py 20 May 2004 18:16:09 -0000 1.175 *************** *** 141,145 **** if filename is None: if rsrc is None: ! # figure out the .rsrc.py filename based on the module name filename = sys.modules[frameClass.__module__].__file__ # chop the .pyc or .pyo from the end --- 141,159 ---- if filename is None: if rsrc 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[frameClass.__module__].__file__)[1] ! #print frameClass.__module__ ! #print sys.modules[frameClass.__module__].__file__ ! #print parent.application.applicationDirectory ! #print filename ! filename = os.path.join(parent.application.applicationDirectory, filename) ! else: ! # figure out the .rsrc.py filename based on the module name ! filename = sys.modules[frameClass.__module__].__file__ filename = sys.modules[frameClass.__module__].__file__ # chop the .pyc or .pyo from the end |