Skip to content
Advertisement

Tag: python

Emulate a mouse click without using the actual mouse on linux

I am working with a program that collects a lot of data then shows it to you in the program. Unfortunately, the program is poorly designed and requires you to “approve” each bit of data collected manually by clicking a checkbox to approve it. In order to automate this process, I wrote a small script that scans for a checkbox,

How to pick a free port for a subprocess?

I am writing a Python wrapper around Appium server. Appium accepts command-line parameter for a local port to bind to. Unfortunately, Appium cannot autoselect a free port for itself, so it either binds to explicitly specified port, or fails with EADDRINUSE. Even when telling it to bind to port 0, it will start successfully, but won’t display what port it

unbound method mainloop() must be called with Tk instance as first argument (got nothing instead)

The below code is a simple code which I tried to check if Tkinter worked… Acoording to https://www.tutorialspoint.com/python/python_gui_programming.html this should open a blank window But the following error message was received Any suggestions… Answer Tkinter.Tk() creates an instance of Tk() object which act as argument for mainloop. Do this instead: Read this for further understanding. tkinter-understanding mainloop

First time using MySQLdb in Arch Linux (Manjaro) show error

it’s first time i using MySQLdb on python and i using Manjaro, when i tried to run my program. The error always show like : Many people suggest me to add file mysqld.sock ang yes i did it, but still error with the same error. And i get suggest to install mysql-client, python-mysql-connector, mysql-python, But still error. Answer According to

How to auto answer linux terminal

My code is But after question is “do you want install [y/n]”. How can I automaticaly answer to question? I want Whenever the terminal asks a question, my answer is be “y”. Answer Just add following to your command: It makes sure that confirmation is avoided.

Advertisement