From: edward <ed...@kr...> - 2005-01-17 10:49:07
|
From: "Brian Debuire" <deb...@ho...> >To: pyt...@li... >Date: Fri, 14 Jan 2005 18:13:20 +0000 >Subject: [Pythoncard-users] Compiling app with child windows > >Hi everyone, > >I recieve this error when launching my compiled app with child windows: > >warning: use func(*args, **kwargs) instead of apply(func, args, kwargs) >warning: use func(*args, **kwargs) instead of apply(func, args, kwargs) >Traceback (most recent call last): > File "<string>", line 48, in on_initialize > File "PythonCard\model.pyc", line 176, in childWindow > File "PythonCard\resource.pyc", line 45, in __init__ > File "PythonCard\util.pyc", line 30, in readAndEvalFile >IOError: [Errno 2] No such file or directory: 'C:\\Documents and >Settings\\UNIANDES\\Mis documentos\\My Projects\\PAULA\\dist\\Main\\<Paula >from archive>.rsrc.py' > >Kevin Altis gave me a fix about how to compile child windows with the old >pythoncard prototipe, but this should be fixed with the new versions, or >maybe I am totally wrong about this error, if so any help would be very >appreciated. > >Thanks, > >Brian > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today it's FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > Brian, I think you might wanna try looking at the setup file that you're using with py2exe. It should look something like this: from distutils.core import setup import py2exe setup( version = "1.0", description = "your program name", name = "name", windows = ["your_program_here.py"], data_files = [ ('', ['<Paula from archive>.rsrc.py', ], ), ] ) distutils does not include PythonCard resource files by default into final dist directory (PythonCard does not "import" the resource file.. it opens it, so distutils would not be able to detect that). In this case, the missing file is your PythonCard resource file, which should be included as shown in the script. Then again, you could simply copy your resource file '<Paula from archive>.rsrc.py' into the dist directory after compiling. I reckon that would work.. it worked for me =) If you still can't get it working, try reading this link - http://www.python.org/doc/current/dist/node12.html Edward |