I'm trying to implementate a solution provided at Take a screenshot via a python script. [Linux] in a python script:
from PyQt5.QtWidgets import QApplication
app = QApplication([])
screen = app.primaryScreen()
screenshot = screen.grabWindow(QApplication.desktop().winId())
screenshot.save('/tmp/screenshot.png')
When running this code python just stops working without spawning an error.
BTO-user@BTO /srcpython/fod
Python 3.2.5 (default, Jul 28 2014, 01:44:48)
[GCC 4.8.3] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtWidgets import QApplication
BTO-user@BTO /srcpython/fod
The module PyQt5 is installed, but these are .dll files. Normally when I install a module there should be source files. These dll files should be a binding to Qt5 and I installed this via the cygwin dev installer. Probably something is incorrect with 1 of these 2 installations, but I tried already many re-installs. It bugs me there is not a single error report.