Say I have been using a GUI where I need to click a few buttons and type in a few fields here and there, was wondering if:
Will it be hard to hard-code to still toggle/"touch" such buttons or fields but without the user input? Sort of like a one script does all..
Also the GUI was already done by some other developer and it is coded in PyQt and some other local modules... And I am still pretty much a noob...
Related
There is a user created GUI which is an .exe that loads a DLL. This GUI has a bunch of sliders, check boxes etc. I would like to move two sliders at the same time using python automatically without me using my mouse to move the sliders. I would like to know the python modules that an be used to achieve this purpose.
You can try using SikuliX.
It can be used to automate mouse or keyboard actions based on pattern matching. It is originally developed for Java I think, but it can be used with Python.
Basically, anything you can do yourself manually can be done with it.
The developer seems to be pretty active, so you can easily seek help from him if you have issues.
My engine is written in GO and I already use SQLITE because I generate some plots that I want to display in a GUI. So far, I think that GO does not have a mature GUI package, so I am building my GUI in Python, with Tkinter that I am familiar with.
When I run my engine in GO with a certain flag, it calls the Python script for the GUI and it generates the content on the background continuously. There are certain modes that the GO engine runs and normally I have to change them by going back to the terminal that runs GO (different plots etc).
What I want, is to create action buttons in my Python GUI that they will change those flags/variables values and the GO script will generate different plots for example, without me going back to the terminal that runs the GO engine and manually do it.
So far, the only implementation from my side, was to create another SQLITE database and save my settings there. Then, when I press an action button at my GUI, it changes the value at my Settings Database and GO reads this value from there all the time, instead of waiting me to input it.
Is there any better way of doing it, passing a variable value(flag etc) from one programming language to the other(Python-GO) without using a database?
The variables that I am changing from the GUI are strings in general and I am asking this question because I think that it is a waste of resources to do it the way I do it.
I'm a (relatively) novice programmer working in Python and Tkinter. The GUI app I'm building has many input fields, and all the data ultimately needs to end up in a file.
I'm wondering about the wisdom of trying to build this without a "save" button, so that it would operate like, say, Google Docs, in which the saving seems to happen more-or-less continuously. I'm worried about my (relatively computer-phobic) users assuming things are being saved to the file as they change various menu entries.
Specifically: is that just done via a background process saving every few seconds, with a save forced if the user tries to close between the auto-saves? Does one try to trigger the saves more intelligently than that? What are the issues?
I created an complete logger-type program, that logs the certain data from the internet sources. It's GUI I coded in wx.python, now I want to daemonize it (if it is the right term). The program needs to run in background and user has to have option to call/open GUI when he pleases. How can I achieve this with wx.python?
I wouldn't really "daemonize" it per se. Instead, I would just put it in the system tray...at least, that's what I would do on Windows. I assume you can do something similar on the other OSes. Basically you want to bind the frame to wx.EVT_ICONIZE and in that method, you hide it. Then when the user double-clicks the taskbar icon, you want to show it and probably Raise it too.
There's some badly formatted code here: http://bytes.com/topic/python/answers/699757-wxpython-how-minimize-taskbar (I've used a variation of it myself, so I know it works).
And here's some information on Task bar icons: http://www.blog.pythonlibrary.org/2011/12/13/wxpython-101-creating-taskbar-icons/
When you tkSimpleDialog.askinteger, the program stalls and waits for user input. What are the basics of writing my own method that would have the same effect? I want to make the same kind of dialog box, I just want to be able to request more information.
The problem that I'm having is that when I open the new window using Tk.Toplevel, the program does not wait for user input the way tkSimpleDialog.askinteger does.
First off, if you can use some other widget system like PyGtk or PyQt, you should seriously consider it. Tkinter is ancient, and the newer libraries have a lot more functionality (read: more things you don't have to reinvent). I've used PyGtk and like it a lot more than Tkinter, which I used in the old Python 1.x days.
That said, in Tkinter, you need to do this:
widget.wait_window(window)
This ties up the event loop waiting for the user to dismiss the dialog.
Reference: http://www.pythonware.com/library/tkinter/introduction/dialog-windows.htm