Хочу сделать программу, которая при клике на кнопку будет делать скриншот:
import pyscreenshot as ImageGrab
from Tkinter import *
root = Tk()
root.title("Screenshot!")
root.resizable(False, False)
def capture():
ImageGrab.grab_to_file('img.png')
action = Button(root, text = "Make screenshot!", command = capture)
action.grid(columnspan = 2, row = 1, column = 0)
root.mainloop()
Ошибка при нажатии на кнопку:
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
set_interactive(1)
У меня стоит Linux Ubuntu 16.04 LTS. Заранее спасибо за помощь!