[wxPython] wxc module when running debug

RE: [wxPython] wxc module when running debug

Sorry to belabor this, but it is fairly critical to our

use of Python and wxPython:

  1. Why do I not need the *_d.pyd files for the regular

Python libraries?

  1. Is the byte-code between debug and non-debug versions

different?

  1. How do you create the .pyd files?

  2. Would I need these debug versions for every wxPython

script?

Thanks for the quick responses, by the way!

···

-----Original Message-----

From: Robin Dunn [mailto:robin@alldunn.com]

Sent: Tuesday, August 06, 2002 1:31 PM

To: wxpython-users@lists.wxwindows.org

Subject: Re: [wxPython] wxc module when running debug

Hm. I’m confused. I do have a file called “wxc.pyd” or

do you mean that I also need “wxc_d.pyd”?

When Python is built in debug mode then “import foo” will search for

“foo_d.pyd” and not “foo.pyd”.

Robin Dunn

Software Craftsman

http://wxPython.org Java give you jitters? Relax with wxPython!


wxpython-users mailing list

wxpython-users@lists.wxwindows.org

http://lists.wxwindows.org/mailman/listinfo/wxpython-users

RE: [wxPython] wxc module when running debug----- Original Message -----

From: Jeff Kotula

Sorry to belabor this, but it is fairly critical to our
use of Python and wxPython:
1. Why do I *not* need the *_d.pyd files for the regular
Python libraries?

Because the production interpreter looks for the *.pyd files, whereas the
debugging interpreter looks for the *_d.pyd files when importing binary
extension modules.

2. Is the byte-code between debug and non-debug versions
different?

Not as far as I am aware.

3. How do you create the .pyd files?

By compiling the source code into a dynamically-linked library.

4. Would I need these debug versions for *every* wxPython
script?

You would need them only if you were running the wxPython scripts using the
debugging version of the Python interpreter.

Thanks for the quick responses, by the way!
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Tuesday, August 06, 2002 1:31 PM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] wxc module when running debug

> Hm. I'm confused. I do have a file called "wxc.pyd" or
> do you mean that I also need "wxc_d.pyd"?
When Python is built in debug mode then "import foo" will search for
"foo_d.pyd" and *not* "foo.pyd".

Perhaps you haven't understood that the use of debug versions of the
extensions is triggered by running a *separate copy* of the Python
interpreter, which was itself created using debug options. The Python source
and compiled (.pyc) files are invariant no matter which interpreter is used.

Hope this clarifies things for you.

regards

···

-----Original Message-----

-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------

Sorry to belabor this, but it is fairly critical to our
use of Python and wxPython:

1. Why do I *not* need the *_d.pyd files for the regular
Python libraries?

It's just the way Python works. When Python itself is built in debugging
mode on win32 it will look for modulename_d.pyd (and *_d.dll too BTW) and
*not* modulename.pyd. The nondebug build of Python works the other way
around.

2. Is the byte-code between debug and non-debug versions
different?

No, but .pyd files are not byte-code.

3. How do you create the .pyd files?

They are DLLs that happen to have a .pyd filename extension. (BTW, Python
will also search for modulename.dll or modulename_d.dll when doing an import
statement.)

4. Would I need these debug versions for *every* wxPython
script?

No, only the binary extension modules and only when you are running the
debug version of the interpreter.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!