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 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.
5 2834 bartonc 6,596
Recognized Expert Expert
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.
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. :-(
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.
bartonc 6,596
Recognized Expert Expert
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 Python command-line, it tells me it
couldn't find the module.
It would seem I have to do something special to get dl to build on my
machine. Does anyone know what that would be? Or is there some other
problem that prevents this from working?
|
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, printing, registry, RTF
etc.), and if portability to other platforms is only a minor concern, ...
would Python be a good choice?
What packages, libraries and modules would you recommend for GUI,
installation, data storage etc.?
Thank you very...
|
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)
anything about Fink.
The default Python on Mac OS X is 2.3 but doesn't come with gdbm. Did
anyone try to get the source of gdbm and build it, and somehow built
the gdbm module for Python on Mac OS X? If so could you share a few
hints? It'll...
|
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__ == 'dumbdbm'
or anydbm._defaultmod.__name__ == 'dbm'):
First of, I'm doing this on a Sparc/Solaris 8 box.
So, I'm trying to get gdbm to be the default mod. I've downloaded and
|
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 Basic. It was
nice to be able to design a visual application with no effort (too bad
I didn't really learn the ins and outs of programming)
Long story short, I want to get back into programming, and Python looks
like a good choice for me to...
| |
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 simple gdbm database causes the trouble. E.g. I create a one-entry db in python 1.5.2
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import gdbm
>>> db2 =...
|
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 result is a 'gdbm
fatal: read error.' Reversing directions results in the same problem.
Below are two small programs that get at the heart of the problem:
#test.py##############
#!/usr/bin/env python
|
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,
using the windows avifile.dll but I am unable to find the AVIFile.h
header...
http://mail.python.org/pipermail/image-sig/2002-February/001748.html
|
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
already has many modules that allow sys admins and devolpers to do
lots of things with the Windows OS, and I'm wondering what the state
of the art is with Python and being able to control and administer a
windows environment. In this regard, how does...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |