wasm-demo/demo/ermis-f/python_m/cur/0744

80 lines
2.7 KiB
Plaintext

From: calishar at *remove*this*.home.com (Calishar)
Date: Thu, 15 Apr 1999 00:22:48 GMT
Subject: Freezing an App
References: <VTQQ2.8373$oD5.4837@news.rdc1.va.home.com> <7f15dj$bq4$1@m2.c2.telstra-mm.net.au>
Message-ID: <sjaR2.29$Z42.54@news.rdc1.va.home.com>
Content-Length: 2466
X-UID: 744
> > The part I am having problems with is using win32api. It runs, doesnt
set
> >the registry values it is suppoed to, and exits without giving any
errors.
>
> Im not sure what you mean here.
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\Rea
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.
> Firstly, you could consider simply shipping win32api.pyd - ie, dont freeze
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.
> You do this simply by excluding win32api from the freeze using "-x
win32api"
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)
> If you want to freeze the win32api sources into your app, the process then
> is:
> * Download the sources to the win32api module.
> * Check out the .ini file that comes with freeze. It is used to locate
the
> source to win32apimodule.cpp.
>
> Run freeze - it may complain it cant find the file. If so, ensure the
> environment variable it uses is set. I can't recall exactly what that is.
Okay, then I did this section, and when I ran freeze at the end it said:
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
Which looks the same as what I had the first time. I did notice that for
win32api it was using the win32api.pyd file rather than the source code
specified in the .ini file.
> This could do with more work - Im happy to discuss ways you can help to
make
> this better for the next person :-)
Thanks for the help, I'm really starting to feel like a dummy here.
Here is the command line I am using for freeze
python freeze.py -p e:\src\python1.5.2c1 -o e:\bins e:\ghostit.py
Calishar