4

I am still pretty new to python. I am on Ubuntu 14.04 and using Python 3.4 in IDLE.

I want to take a screenshot and after doing research it seemed like pyscreenshot was a good solution. After following install documentation I tried this.

import pyscreenshot as ImageGrab

im = ImageGrab.grab()
im.show()

After using print statements to find my problem with it not working. It seems to hang after

im = ImageGrab.grab()

I have read through documentation and tried to find solutions, but I can not find any help with this. I have tried different backends to see if it fixes the problem, but it always does the same thing.

UPDATE: I figured out that it is a problem with IDLE. If I use terminal and run the script with python3 command it works fine. If anyone knows why IDLE doesn't want to work. Please let me know. Thanks.

1 Answers1

1

You can turn off multiprocessing in pyscreenshot. Like

import pyscreenshot as ImageGrab
im = ImageGrab.grab(childprocess=False)
im.show()

I found the answer on this page. Check that out. https://github.com/ponty/pyscreenshot/issues/38