Freezing an App

Mark Hammond MHammond at skippinet.com.au
Thu Apr 15 02:01:10 EDT 1999


Calishar wrote in message ...
>okay, basically I am using Python to automate a process at a client site.
in
>this application, I have about 4 different functions which each get called
>by button clicks. One of the routines is supposed to set a registry key
>based on an environment variable. The lines follow:
>
>
>the_key=win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE,"Software\Stac\Re
a
>chout\8.0")
>  win32api.RegSetValueEx(the_key,"Computer
Name",0,win32con.REG_SZ,mac_name)
>
>At the moment, this is the only part of the application I dont have working
>on my non-development system, unfortunately it happens to be kind of
>important.

Are you sure the code is being executed at all?  I cant imagine how these
could silently do nothing.

>  This was my first thought, I made sure that I had the .pyd file in the
>same directory as the program I am running. It doesnt do it.

Why not?  I would bet its not on the sys.path.  Just before the import, add
a  "print sys.path".  Frozen programs can use .pyd files fine.

>  Tried doing this, then copying the files needed over to my '95 test
system
>(not the same OS,but should be close enough for this part) and when I ran
>it, it crashed at line 3 of the code (import win32api)

Im sure that it is just path fiddling.  (OK - I hope it is :-)

>generating table of frozen modules
>No definition of module _tkinter in any specified map file.
>No definition of module win32api in any specified map file.
>Warning: unknown modules remain: _tkinter win32api

OK - the .ini file may not have an entry for win32api.  Im afraid I havent
use the latest version of freeze, and cant recall exactly what is in it, but
basically you need to have freeze find a [win32api] section in one of the
.ini files.

Mark.






More information about the Python-list mailing list