i am trying to take user inputs in a popup and i have tried so many ways i.e. external libraries of python that works with GUI (tkinter, pyqt, easygui etc. etc. etc.)
Is there any way to do the same without such GUI library ???
And the reason i want to avoid these GUI lib is: i want to use this feature on multiuser web application running on linux remote server, and there is problem of DISPLAY variable on it.
If anyone going to suggest for this DISPLAY error solution with ssh X forwarding, then as i said its multi user web application, how would it be possible to forward DISPLAY to multiple users ???
I will be glad if i can find the answer of first question of having a solution to do without any external GUI lib .... thanks
Related
Are there libraries for automating (using Python) the management of a program run by a user on a Linux operating system?
I need to create tests to test the program interface (pressing buttons, entering text in special fields, reading text from the program window).
UPD:
pywinauto - as I understand it, this library is only suitable for managing Windows applications
UPD2:
The application that needs to be managed works on the basis of Visual Studio, maybe I can somehow connect to it using selenium?
I am developing a python application.
This application generates as a final result a table of type .xlsx
To reach the final table I used Anaconda's jupyter.
I would like to create a graphical interface for the python application. However, I have some theoretical doubts on the subject:
Since, I would like to enter the table and show the statistical results to the user (according to filters applied by the users). What would be the most appropriate approach?
Option A) Use an interpreter, such as TkInter? Are these interpreters capable of
generating an executable? Is it able to receive a data entry table?
Option B) Use a web framework, such as Django. Does this framwork host the built page?
It is capable of receiving a data entry table.
I am open to more options. Thank you.
tk is better for a distributed desktop application. It can be packaged and distrubuted.
Another option is a cool package called Eel, kinda like electron for python. You can build desktop apps using html, css, js, and most of all python: https://github.com/samuelhwilliams/Eel
Is there any Python library or framework that provide scheduling of Jobs in windows having GUI. By jobs, I mean some batch files or Python scripts.
An application where edit, create and deletion of jobs are available.
I have tried and looked a lot of questions, and finally mashed up.
Please suggest some library or a way to create one GUI application for the same.
I used Tkinter and PyQt5 .What I really recommend is PyQt5 for many reasons:-
1.Easy syntx
2.More human readable
and lastly there is an application created to ease and save time on designing the app
for PyQt5 which is Qt designer it's going to convert all the look of you application into python codes so all you have to do copy , paste and do the functionality like when clicking a button something happens etc. Highly recommend PyQt
I have the application installed on my windows PC, I want to launch that application using python and select dropdown options and do some other activities in that application.
I was able to launch the application using the os.system command, but I am not able to proceed further.
I want my program to do things like:
* select from a dropdown menu
* click on a button
How can my application control the user interface of another application?
Normally, an application exposes a user interface (UI) for users, and an application programming interface (API) for programming.
A human being uses keyboard and mouse to work with the user interface (UI)
An application uses programming to work with the application programming interface (API)
The UI is designed for humans, and the API is designed for computers.
It is sometimes possible to use programming to control the user interface of another program -- so your program acts as if it were using the keyboard and mouse. This technique is often called "UI automation", and programs that do it are sometimes called "robots".
It's a big topic, and it can be quite complex. It's almost always better to use an API instead if you can: it's faster, simpler, more reliable.
If you do need to use UI automation, there are a few different tools that can help.
You are asking about Python, so here are a few UI automation tools that work with Python:
AutoIT is a standalone product, but you can use Python to script it.
PyWinAuto is designed for use from Python.
Sikuli uses computer vision to find parts of the screen. I believe it comes with a recording tool as well.
Just to repeat: UI automation is weird and hard. If you can possibly use an API instead, your life will be much easier.
You need to install pywinauto package
Try the following code to run the .exe file
from pywinauto import application
app = application.Application()
app.start("Notepad.exe")
here you are:
(with os ^_-)
import os
os.startfile('your exe file address')
lately I have been trying to find a way to control applications on my ubuntu using python. What i want to achieve is something like what we can do with applescript in mac.... Control chrome send queries to it etc.
can someone please point me in the right direction as to how one can control applications using python, esp on Ubuntu...or a code snippet maybe?
Read about D-Bus: http://en.wikipedia.org/wiki/D-Bus
Python dbus: http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html
In order to control a process, it must be connected using dbus in the first place and exporting services. This is the same idea of AppleScript. On a mac, an application has to be exporting services that can be controlled over applescript.
PyQt/PySide has a DBus module as well: http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtdbus.html
Have you taken a look at Project Sikuli?