FAQ
When I try to import the example DLL on Windows NT, I get an
"Application Error" dialog for python.exe (with the usual unreadable
hex junk), and then python quits after printing "Fatal Python error:
PyThreadState_Get: no current thread". I typed "import example"
right after launching Python.

I've got Python 1.5.2 on Windows NT, and I'm using the python.exe
that came with it (I didn't rebuild it from sources). I'm trying to
get the example DLL from /python/PC/example_nt to work using Visual
C++ 6.0, and I get this error using the example right out of the box,
without modification, as described in the readme.

Anybody knows what's going on?

I'm very experienced with Windows, C, C++, and Visual C++, but I'm a
Python and DLL newbie. Any help will be greatly appreciated.

Thanks,

-- Ed

Search Discussions

  • D. savitsky at Jul 31, 2000 at 2:46 am
    I am not sure if this is what you need, but to connect to dll's (that is, to
    call functions in them) I use windll/calldll (in the Dynwin package from Sam
    Rushing @ http://www.nightmare.com)
    Once it is extracted try something like
    from dynwin.windll import *
    m = module('mydll32') # note no .dll extension
    x = m.SomeFunction()
    x
    'returned stuff'

    I don't know if this is what you are asking, but it is all i know how to do
    :)
    doug

    "Ed Stauff" <Ed_Stauff at avid.com> wrote in message
    news:8m2fqq+kecb at eGroups.com...
    When I try to import the example DLL on Windows NT, I get an
    "Application Error" dialog for python.exe (with the usual unreadable
    hex junk), and then python quits after printing "Fatal Python error:
    PyThreadState_Get: no current thread". I typed "import example"
    right after launching Python.

    I've got Python 1.5.2 on Windows NT, and I'm using the python.exe
    that came with it (I didn't rebuild it from sources). I'm trying to
    get the example DLL from /python/PC/example_nt to work using Visual
    C++ 6.0, and I get this error using the example right out of the box,
    without modification, as described in the readme.

    Anybody knows what's going on?

    I'm very experienced with Windows, C, C++, and Visual C++, but I'm a
    Python and DLL newbie. Any help will be greatly appreciated.

    Thanks,

    -- Ed

  • James C. Ahlstrom at Jul 31, 2000 at 1:07 pm

    Ed Stauff wrote:
    When I try to import the example DLL on Windows NT, I get an
    "Application Error" dialog for python.exe (with the usual unreadable
    hex junk), and then python quits after printing "Fatal Python error:
    PyThreadState_Get: no current thread". I typed "import example"
    right after launching Python.
    A couple things to try:

    Make sure the DLL is linked against the same python15.lib
    as is used for python.exe. Mixed DLL versions can cause
    problems.

    Use VC "Depends" to see exactly which DLLs are needed
    by your DLL and by python.exe. Make sure they are there.

    Make sure you linked the C runtime "Multithread DLL",
    not some other C runtime.

    Jim Ahlstrom

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 31, '00 at 12:04a
activeJul 31, '00 at 1:07p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase