469,573 Members | 1,684 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Windows GDBM module for Python 2.4, 2.5 [compile extention or use ctypes]

7
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\pythonw.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 course, I would be very happy with a pointer to some instructions for building the module on my own (I am using cygwin), but my experience with doing that has been pretty limited.
Oct 26 '06 #1
5 2565
bartonc
6,596 Expert 4TB
I found that compiling extentions on Windows is something of an art form. All the stuff that I could find when I was trying to get minGW to work was a couple of years old. I can give you links if you are interested. What works wonders for me and is in current development with mail list support is SWIG (Simple Wrapper and Interface Generator).
I use SWIG with MS Visual Studio. I have been meaning to look into pyrex, as I just got some sourse code for an extention which is incomplete and I would like to finish the work on it.

Alternatively, python 2.4.4 and 2.5 come with sqlite extentions (haven't tried this yet). I use MySQLdb module with 2.4 (still waiting for 2.5 MSI; may have to compile this one myself).

Of course, both of these options use lots of disc space, but HDs are cheap these day.
Oct 27 '06 #2
brokow
7
I found that compiling extentions on Windows is something of an art form. All the stuff that I could find when I was trying to get minGW to work was a couple of years old. I can give you links if you are interested. What works wonders for me and is in current development with mail list support is SWIG (Simple Wrapper and Interface Generator).
I use SWIG with MS Visual Studio. I have been meaning to look into pyrex, as I just got some sourse code for an extention which is incomplete and I would like to finish the work on it.
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.

Alternatively, python 2.4.4 and 2.5 come with sqlite extentions (haven't tried this yet). I use MySQLdb module with 2.4 (still waiting for 2.5 MSI; may have to compile this one myself).

Of course, both of these options use lots of disc space, but HDs are cheap these day.
For better or worse, I am stuck with GDBM for this project. And I am surprised that there is any problem with that. It seems like a common enough db format that a module should be sitting around somewhere. It's there for C, it's there for python 1.5, it's there for newer python running under *nix. Just no love for newer python under windows. :-(
Oct 27 '06 #3
bartonc
6,596 Expert 4TB
You probably found the Moron's guide at
http://www.emmestech.com/software/cy...43/moron1.html
already.
This may be of some use to you...
http://sebsauvage.net/python/mingw.html

Hope that helps,
Barton
Oct 27 '06 #4
brokow
7
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 approach, which makes it a good link for me. Thanks.
Oct 28 '06 #5
bartonc
6,596 Expert 4TB
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 approach, which makes it a good link for me. Thanks.
You may want to look into ctypes (documentation is in 2.5) downloads available for earlier versions. Please start a new thread if this becomes the topic of interest. Thanks,
Barton
Oct 29 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Steven D. Arnold | last post: by
16 posts views Thread by Pjer Holton | last post: by
2 posts views Thread by Fortepianissimo | last post: by
1 post views Thread by Ed | last post: by
53 posts views Thread by noahmd | last post: by
reply views Thread by Douglas Applegate | last post: by
3 posts views Thread by c d saunter | last post: by
3 posts views Thread by Krishna Kirti Das | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.