472,371 Members | 1,361 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

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 2730
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

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

Similar topics

3
by: Steven D. Arnold | last post by:
Hi, I'm on Mac OS X 10.2.6, using Python 2.3final. I would like to use the dl module to get access to some system calls, in particular kvm_getprocs. However, when I try to import dl at the...
16
by: Pjer Holton | last post by:
If I were to build a Windows application that is a true standard Windows application in every conceivable way and that adheres to the MS Windows standards as much as possible (installation, GUI,...
2
by: Fortepianissimo | last post by:
First off I know I can install the latest python from Fink quite easily and it'll give me everything needed. But I'm trying to distribute my python app to end users who don't really care (or know)...
1
by: Ed | last post by:
I am trying to use a Perl script which requires a Database module other than "dbm" to be the default Mod. So, what the script is checking is import anydbm if (anydbm._defaultmod.__name__ ==...
53
by: noahmd | last post by:
Okay, once-upon-a-time I tried to start programming by learning C. At the time I was younger and didn't really understand all that C had to offer. I eventually moved over to Microsoft's Visual...
1
by: brokow | last post by:
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...
0
by: Douglas Applegate | last post by:
Hi- I am having a problem with shelve. The problem I think is really with gdbm. I'll write out a file using shelve/gdbm on an amd64 machine and then I'll try to read it in on a i386 machine. The...
3
by: c d saunter | last post by:
Hi All, I'm trying to access individual video frames of an AVI file from within Python 2.4 or 2.5 under Windows XP. I have found this example code here for that does exactly what I want,...
3
by: Krishna Kirti Das | last post by:
I am a long-time user of Perl who comes to you in peace and is evaluating different scripting languages for use as a scripting platform for system administrators on the Windows platform. Perl...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.