468,257 Members | 1,407 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

Need help with extension modules built in debug mode

I've come to the conclusion that posting about Embedded Python on the
Python forums is a complete waste of time. I hope I can get some
useful insights here.

I'm looking for some help with extension modules built using Visual
Studio. I'm using the simple extension module example "hello" (taken
from the "Programming Python" book). I'm building it successfully in
both release and debug mode using a Visual Studio project.

I can successfully import the release build of the module into the
release build of Python. For example:

[E:\]python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more
information.
>>import hello
hello.message("Bob")
'Hello, Bob'
>>quit()

I cannot, however, load the debug build of the exact same code (stored
in the exact same location) into the debug build of Python:
[E:\]python_d
Python 2.5.1 (r251:54863, Jun 5 2007, 10:17:28) [MSC v.1400 32
bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more
information.
>>import hello
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named hello
[26848 refs]
>>quit()
[7826 refs]
Does anybody know what tricks or coding magic might be required to get
debug extension modules to load into debug Python?
Aug 26 '08 #1
4 1570
bh****@comcast.net wrote:
I've come to the conclusion that posting about Embedded Python on the
Python forums is a complete waste of time. I hope I can get some
useful insights here.
(just curious, but what are the "Python forums"? isn't the
newsgroup/mailing list *the* Python forum?)

</F>

Aug 26 '08 #2
On Tue, 26 Aug 2008 08:20:44 +0200, Fredrik Lundh
<fr*****@pythonware.comwrote:
>bh****@comcast.net wrote:
>I've come to the conclusion that posting about Embedded Python on the
Python forums is a complete waste of time. I hope I can get some
useful insights here.

(just curious, but what are the "Python forums"? isn't the
newsgroup/mailing list *the* Python forum?)
http://python-forum.org/pythonforum/index.php
Aug 26 '08 #3
En Tue, 26 Aug 2008 01:11:10 -0300, <bh****@comcast.netescribi�:
I've come to the conclusion that posting about Embedded Python on the
Python forums is a complete waste of time. I hope I can get some
useful insights here.

I'm looking for some help with extension modules built using Visual
Studio. I'm using the simple extension module example "hello" (taken
from the "Programming Python" book). I'm building it successfully in
both release and debug mode using a Visual Studio project.

I can successfully import the release build of the module into the
release build of Python. For example:

[E:\]python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more
information.
>>import hello
>>hello.message("Bob")
'Hello, Bob'
>>quit()


I cannot, however, load the debug build of the exact same code (stored
in the exact same location) into the debug build of Python:
Does anybody know what tricks or coding magic might be required to get
debug extension modules to load into debug Python?
In debug mode, python looks for hello_d.pyd - NOT hello.pyd.
Note that neither hello.dll nor hello_d.dll are recognized anymore since
version 2.5

--
Gabriel Genellina

Aug 27 '08 #4
On Wed, 27 Aug 2008 00:31:37 -0300, "Gabriel Genellina"
<ga*******@yahoo.com.arwrote:
>In debug mode, python looks for hello_d.pyd - NOT hello.pyd.
Note that neither hello.dll nor hello_d.dll are recognized anymore since
version 2.5
Excellent! Thank you, Gabriel. Just what I was missing.
Aug 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Alexander Skwar | last post: by
reply views Thread by Nick Coghlan | last post: by
4 posts views Thread by Alexander Eisenhuth | last post: by
13 posts views Thread by SpaceCowboy | last post: by
1 post views Thread by E.T. Grey | last post: by
3 posts views Thread by Tony Johansson | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.