Problem with mxDateTime on HPUX 11.11 machine !
Tien Nguyen
tienhuyen at hotmail.com
Tue Aug 26 20:22:10 EDT 2003
Hi There,
I installed python2.3 (configured with option
--with-libs='lpthread -lcl'), and egenix-mx-base-2.0.5 on an HPUX
B.11.11 machine. Everything seems to be OK. I can start python and
import mx modules successfully.
tnguyen at local_host:/users/denver/tnguyen 71 % python
Python 2.3 (#1, Aug 26 2003, 16:06:40)
[GCC 3.1] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>> from mxDateTime import *
>>> from mxDateTime import __version__
>>> from DateTime import *
>>> from DateTime import __version__
>>>
The problem was that, in my c program, I call the python API:
PyObject* call_module = PyImport_ImportModule("module_name");
call_module always NULL and I got the following error on screen:
*** You don't have the (right) mxDateTime binaries installed !
I think this message comes from:
python_home/lib/python2.3/site-packages/mx/DateTime/mxDateTime/__init__.py
----------------------------------------------------------
""" mxDateTime - Date and time handling routines and types
Copyright (c) 2000, Marc-Andre Lemburg; mailto:mal at lemburg.com
Copyright (c) 2000-2001, eGenix.com Software GmbH;
mailto:info at egenix.com
See the documentation for further information on copyrights,
or contact the author. All Rights Reserved.
"""
try:
from mxDateTime import *
from mxDateTime import __version__
except ImportError, why:
print "*** You don't have the (right) mxDateTime binaries
installed !"
raise ImportError, why
#from mxDateTime_Python import *
#from mxDateTime_Python import __version__
# Python part of the intialization
try:
import time
setnowapi(time.time)
del time
except NameError:
pass
--------------------------------------------
I don't know why it always raise exception like that!?
Can any python expert or mxBase expert help me with this?
Thank you very much.
Tien Nguyen
More information about the Python-list
mailing list