This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: External library behave differently when loaded by Python (maybe thread issue)
Type: Stage: resolved
Components: ctypes, Extension Modules, FreeBSD Versions: Python 3.7, Python 3.6, Python 3.3, Python 3.4, Python 3.5, Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, koobs, sylgar
Priority: normal Keywords:

Created on 2017-04-14 10:09 by sylgar, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg291644 - (view) Author: (sylgar) Date: 2017-04-14 10:09

I have which has just one function (sylvain_display()) which displays an hello world windows through QT libraries.

I have this one program `sylvain' which is a single line program which calls sylvain_display from

When I run `sylvain', I have some debug output from QT on the console, and the hello world window is displayed on my TV (I am running this on a Raspberry Pi with FreeBSD).

Now, when I run python2.7 or python3.6, and load either through the ctypes module or through a C extension module, and call the sylvain_display() function from python, I have the console log output from QT as with the `sylvain' program, but I don't have the window on my TV!

I guess the rendering to the TV is done on a separate thread and this one is not called or locked?

I came up with this simple test program to isolate the issue because both PyQT and PySide now don't work as expected, I have console log but no actual TV output.

This used to work one year ago, I don't know what has changed in Python. 

Hope you guys will figure this out.

sylvain.cpp (test program for libsylvain): (load libsylvain):

Also tried with a C extension to rule out ctypes bug, same issue:
sylvainmodule.cpp (python module wrapper):
sylvain-next.pu (load sylvainmodule and sylvain_display):

build script:
msg391527 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-04-21 15:43
I'm closing this as out of date because the links no longer work and both Python 2.7/3.6 are no longer maintained. If you are still having this problem with more recent versions of Python, please create a new issue with up-to-date reproduction information.
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74255
2021-04-21 15:43:31iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg391527

resolution: out of date
stage: resolved
2017-04-14 10:09:49sylgarcreate