import _winreg does not work. How do I fix?

J

John Sellers

newbee question...I haven't worked on Python since Python 1.5.2


cygwin setup installs Python 2.3.2-1 on Windows XP

however:


$ python
Python 2.3.2 (#1, Oct 9 2003, 12:03:29)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):



WHY??
 
M

Miki Tebeka

Hello John,
Traceback (most recent call last):
There is no _winreg on cygwin, only on "true" win32 python.
If you must use cygwin you can either patch _winreg to work for you or
use cygwin's regtool (try regtool --help)

HTH.
Miki
 
J

John Sellers

Sounds reasonable, but if what you say is true, I am surprised that not
all Python 2.3.2 releases are not equal.

How good is your information? Is it authorative?

===

I need to be in cygin because I have an extensive integrated environment
which includes many cygwin packages, and several python 3rd party packages.

I could hack it with a true win32 python, but my gut says this is not
the way to go.
 
M

Miki Tebeka

Hello John,
Sounds reasonable, but if what you say is true, I am surprised that not
all Python 2.3.2 releases are not equal.

How good is your information? Is it authorative?
It's not authorative. It's experience :)

See Jimmy's mail about OS differences. If you want Python to be the
same in all OS's you'll get the lowest common subset of functionality.
I could hack it with a true win32 python, but my gut says this is not
the way to go.
You can either write a module that wraps regtool. Another way is to
write
a C module that does registry work and use SWIG, Boost, ... to make it
a Python module.
Yet another option is to write the .reg file and let Windows handle
it.

IMO if runtime is not that important create a winreg module the uses
regtool.

HTH.
Miki.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top