Problem with mxDateTime on HPUX 11.11 machine !

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tien Nguyen

    Problem with mxDateTime on HPUX 11.11 machine !

    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@local_h ost:/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.[color=blue][color=green][color=darkred]
    >>> from mxDateTime import *
    >>> from mxDateTime import __version__
    >>> from DateTime import *
    >>> from DateTime import __version__
    >>>[/color][/color][/color]

    The problem was that, in my c program, I call the python API:

    PyObject* call_module = PyImport_Import Module("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@lemb urg.com
    Copyright (c) 2000-2001, eGenix.com Software GmbH;
    mailto:info@ege nix.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_Pyth on import *
    #from mxDateTime_Pyth on 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
Working...