Solved

Installing and using Berkeley DB XML with Python

Posted on 2004-10-05
6
798 Views
Last Modified: 2010-08-05
Can someone help me by giving step by step instructions on how to get started with Berkeley DB XML and Python.

I've downloaded DB XML binaries (http://www.sleepycat.com/products/xml.shtml) and the Berkeley DB bindings for Python (http://pybsddb.sourceforge.net/).

When I try to run my test code it fails with:

    from dbxml import *
ImportError: No module named dbxml

I've found the dbxml.py in the DB XML source distribution?
But how do I install this module?
0
Comment
Question by:mbutu
6 Comments
 
LVL 3

Expert Comment

by:hweber
Comment Utility
I don't know if the Python bindings for the Berkeley DB support the Berkeley DB XML at all, but I have the bindings running for the "normal" version.

The Python bindings contain C-code that needs to be compiled for your platform. If you are working on Windows, the build process for Visual C++ (up to Python 2.3.x) looks like this:

Unpack the ZIP-file to a temporary directory.
Open the project file contained in the ZIP-file.
Select db_static as current build target.
Select Release Static as configuration.
Edit the target options:
  Go to the C/C++ tab and select Code generation.
  Select Multithreaded DLL.
Build the target.
Use "python setup.py install" from the directory you unpacked the sources to.

On Linux you probably can unpack the tar.gz file and call "python setup.py install" directly.
0
 

Author Comment

by:mbutu
Comment Utility
I found the solution. I just go to apt-get.org and download the right package and install it.
0
 
LVL 9

Expert Comment

by:rjkimble
Comment Utility
What's the right package?
0
 

Author Comment

by:mbutu
Comment Utility
I think I found it by searching for dbxml.

But now it seems to have disappeared: http://www1.apt-get.org/search.php?query=dbxml&submit=&arch%5B%5D=i386&arch%5B%5D=all

Sebastien Ducoulombier <sebastien.ducoulombier@lesdeveloppementsdurables.com> seems to be the maintainer of the debian package.
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed with points refunded (400)

modulo
Community Support Moderator
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SCP not working 7 60
Python Hue issue with import 12 68
cannot use pip to install pandas or pandas_datareader 5 62
python question 5 56
"The time has come," the Walrus said, "To talk of many things: Of sets--and lists--and dictionaries-- Of variable kinks-- And why you see it changing not-- And why so strange are strings." This part describes how variables and references (see …
Introduction On September 29, 2012, the Python 3.3.0 was released; nothing extremely unexpected,  yet another, better version of Python. But, if you work in Microsoft Windows, you should notice that the Python Launcher for Windows was introduced wi…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now