473,555 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2.5a1 import of .dlls

I've re-built an extension module (as a .dll) using the 2.5a1 release.
Unexpectedly, I'm not able to simply import it (not the way I can when
building it for 2.3). Using imp.load_dynami c() the import succeeds.
import minx # Implemented in a .dll - fails Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named minx import imp # Workaround
import os
minx = imp.load_dynami c('minx', os.getcwd() + '\\minx.dll')


I couldn't find anything to indicate this is by design in 2.5a1 (I did
read the PEP 328: Absolute and Relative Imports) - am I doing something
wrong?

Apr 18 '06 #1
1 1788
sv**********@gm ail.com wrote:
I've re-built an extension module (as a .dll) using the 2.5a1 release.
Unexpectedly, I'm not able to simply import it (not the way I can when
building it for 2.3). Using imp.load_dynami c() the import succeeds.
import minx # Implemented in a .dll - fails Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named minx import imp # Workaround
import os
minx = imp.load_dynami c('minx', os.getcwd() + '\\minx.dll')


I couldn't find anything to indicate this is by design in 2.5a1 (I did
read the PEP 328: Absolute and Relative Imports) - am I doing something
wrong?

Extension modules for 2.5 can no longer have the '.dll' extension, they must
have a '.pyd' extension. I don't know why this isn't documented somewhere (although
I would expect it in Misc/NEWS instead of in PEP 328) - you should filke a bug report.

Thomas

Apr 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6394
by: Markus Doering | last post by:
Hello, I just switched from 2.2 to Python 2.3. I am developing an XML/CGI interface to databases as a python package called "unitWrapper" containing several modules which ran fine under v2.2. Running Python2.3 under windows2000 I get import errors when a module imports another module of the same package with absolute package-names like...
1
1237
by: Peter Schwabe | last post by:
Hi all, is it possible to import classes (not functions) from native dlls to c#-Code and if so: how? We found several ways using wrapper-classes importing every particular class method, but that seems quite bulky... Thanks, Peter and Ruben
79
5213
by: pinkfloydhomer | last post by:
I want to scan a file byte for byte for occurences of the the four byte pattern 0x00000100. I've tried with this: # start import sys numChars = 0 startCode = 0 count = 0
6
4847
by: [Yosi] | last post by:
Hi, I have a general DLL "genDLL.dll",this dll open other dlls by calling generalDll.openDll("dll1.dll"). I mad a form with got dll name in new,and then this for open the new dll by calling the openDll function. the problem is when I make more than one instance of this Form from MDI the All form work with same dll even if thay are deferent. ...
1
4813
by: Mythran | last post by:
In other languages, I can create a dll and then use that dll in different languages. Example: Create a library (.dll) using C/C++ and then import functions from the dll's for use in Pascal. I am trying to do this with the assembly being a test vb.net library I wrote. What does the vb.net library need (attributes, settings, et cetera) to...
1
1522
by: Thomas Klein | last post by:
Hello newsgroup, I am new to C# and need to import a DLLs from a software vendor. I have already successfully tried to import a Win32-DLL in this way: /* * import DLL */
17
5387
by: mohan | last post by:
Hi Guys, I've been using the following IDE, "Pythonwin - Python IDE and GUI Framework for Windows. Copyright 1994-2001 Mark Hammond " With respect to my work, I had created my own modules (.py files) in drives and folders other than the python root. I know that if I need to
0
2970
by: =?Utf-8?B?UGFy?= | last post by:
Hi I have a question on how to import unmanaged DLLs into Visual Studio 2005, C# environment. The background is that an instrument we bought is controlled through a couple of DLL files. I belive they are written in C++ and compiled for an Windows enviroment but we only got the binaries. Looking at the examples within Visual Studio we have...
5
5199
by: Stef Mientki | last post by:
hello, The import statement "import sqlite3" gives the error given below. In simple programs, the import statement (sometimes) succeed, and I can indeed access the database. So I guess there is some conflict with another part of my program, but as the program is rather large (and dynamic) it's not easy to isolate the problem. Does anyone...
3
7260
by: jrh | last post by:
Hello, From previous posts and documentation it seems python should be able to import a module that is compiled into a .dll just as well as a .pyd. I have a pyd that works fine, but after renaming it to dll the import fails. Running python with -vv flag indicates it doesn't actually look for the dll (see below). Has dll import been...
0
7542
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...
0
7824
Oralloy
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. ...
0
8060
jinu1996
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...
0
7903
tracyyun
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...
0
6176
agi2029
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...
0
3573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2034
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
1
1156
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
863
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.