ponty / pyscreenshot

Python screenshot library, replacement for the Pillow ImageGrab module on Linux.
BSD 2-Clause "Simplified" License
502 stars 88 forks source link

Python3 Bytearray to bytes TypeError fix #50

Closed dosssman closed 6 years ago

dosssman commented 6 years ago

Updated 2 deprecated functions Under Arch Linux, using Python 3 and wxpython installed with pip3 Any call to pyscreenshot.grab() would return a: TypeError: argument 1 must be read-only bytes-like object, not bytearray. Therefore, adding bytes() to convert myWxImage.GetData() from bytearray to bytes

Added controled on Python version check preserve compatibility (???)

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.08%) to 39.469% when pulling b5c975504f5fa43a9147e08ed645de5e5d8d4b3e on dosssman:patch-1 into 2730487ebc44282ec78b83532f424368b4ce2fb8 on ponty:master.

dosssman commented 6 years ago

Not sure how to preserve compatibility with Python 2.7 adequatly.

ponty commented 6 years ago

This was implemeted in #51