From: MHammond at skippinet.com.au (Mark Hammond)
Date: Thu, 15 Apr 1999 16:01:10 +1000
Subject: Freezing an App
References: <VTQQ2.8373$oD5.4837@news.rdc1.va.home.com> <7f15dj$bq4$1@m2.c2.telstra-mm.net.au> <sjaR2.29$Z42.54@news.rdc1.va.home.com>
Message-ID: <7f3v96$g88$1@m2.c2.telstra-mm.net.au>
Content-Length: 1760
X-UID: 1102                                                  

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.






