BTW, I could provide the gdbm file I get when using python 1.5.2 if it would help. It's only 3085 bytes.
It occurs to me that there may have been some other difference that is causing my incompatibility besides just the gdbm version (like the gdbm module having been compiled to use null-terminated strings or some such, though I don't think that is the issue here).
The gdbm file I get under python 1.5.2's gdbm is here...
User Profile
Collapse
-
-
GDBM incompatibility in different python versions?
I have been trying to get the gdbm module in python 2.4 to read a gdbm file from python 1.5.2 and having no luck. I get a file error when I try to open the 1.5.2-created gdbm file.
Even a very simple gdbm database causes the trouble. E.g. I create a one-entry db in python 1.5.2
...Code:Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>>
-
Please repost your message using [code][/code] tags around all code you post.Leave a comment:
-
Thanks much. I had read the first link when learning to compile my first python DLL (PYD). But, looking it over again, I may try the process again (regenerate my def files) on this latest project with a closer eye on what is going wrong.
I will take a look at minGW. It looks pretty cool, I just worry about it taking care of too many details for me without my learning what's going on. Nonetheless, it looks like it takes an explanatory...Leave a comment:
-
I would love those pointers. I have a couple refs to minGW (which I haven't used explicitly, but I have found many of the same strategies work for compiling with gcc -mno-cygwin). I guess I should take another look at SWIG, though my first glance made it seem more a tool for embedding python (or another language) into a C app.
For better or worse, I am stuck with GDBM for this project. And I am surprised that there...Leave a comment:
-
Windows GDBM module for Python 2.4, 2.5 [compile extention or use ctypes]
I was lucky to find Milton L. Hankins' Python 1.5 port of gdbm.pyd on the web a while ago, but I was wondering if there is one that works with a more recent version of Python? (For me, that one kills python24\python w.exe in Pythonwin and SPE on import, though it's a VC++ Runtime Error, so it could be a different DLL problem somewhere...) It just seems a little odd that no one would have done this or that it's so tough to find.
Of... -
(The odd character is just the two characters :p being interpreted as the :p emoticon because the code wasn't posted inside of code tags.)
The if-elif chain in your main loop is indented too far. You probably want something like
...Code:while ( (guess != correct) and (guess != "") ) or (guess =="hint"): print "Sorry, that's not it. Would you like a hint?" guess = raw_input("YourLeave a comment:
No activity results to display
Show More
Leave a comment: