Ticket #74 (closed defect: fixed)

Opened 3 months ago

Last modified 2 months ago

Bindings for python <2.5

Reported by: etiennebr Owned by: hobu
Priority: major Milestone: 1.0
Component: Python Bindings Version: svn-trunk
Keywords: Python, import, DLL, PATH Cc:
LAS Format Version: Not Applicable

Description

When you import liblas in python <2.5, you get an error :

>>>import liblas
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
ImportError: dynamic module does not define init function (initliblas)

Hobu : «This is because Python < 2.5 used to attempt to import DLLs with the extension .dll before looking for .py files or .pyd. Python >= 2.5 won't even import a .dll anymore, and will only import .pyd for extension modules. Because the dll is named liblas.dll now (we no longer put the version name in the dll), and it is in a PATH location, Python 2.4 is trying to import it before importing the ctypes module [...] I will have to think about where we can place the DLL so it doesn't end up on a Python search path.»

Change History

Changed 3 months ago by etiennebr

  • summary changed from Python bondings for python <2.5 to Bindings for python <2.5

Changed 2 months ago by hobu

  • status changed from new to closed
  • resolution set to fixed

Fixed in r874. We'll use liblas1.dll for the filename, and Python < 2.5 will no longer be confused.

Note: See TracTickets for help on using tickets.