2

First time asking here, so I hope someone has an answer for me.

I am using Ubuntu 14.04LTS, and using pyautogui for the first time.

From the terminal I have just only imported pyautogui, and get the output of:

<class 'Xlib.protocol.request.QueryExtension>

When I run pyautogui inside of a python(2.7.6) file, this line is always output to the terminal. Is there anyway to stop pyautogui from printing this line to the terminal?

import pyautogui

def someFunction():
    ....
    return x&o's

someFunction()
R.U.F.
  • 23
  • 5

1 Answers1

0

I do not know what OS you are running, but I am running Linux and was able to solve that issue, by installing the required packages from the documentation "On Linux, PyAutoGUI requires python-xlib (for Python 2) or python3-Xlib (for Python 3) module installed."

Following this guys answer

sudo pip install svn+https://svn.code.sf.net/p/python-xlib/code/trunk/

How do you install Python Xlib with pip

I ran that because with the regular pip install pyautogui was not sufficient. See Below with code being inputs and yellow being outputs

import  PIL
from PIL import Image
import pyautogui

Xlib.protocol.request.QueryExtension

import pyautogui

Hope that helps!

Community
  • 1
  • 1