-
Packaging python executables
06/30/2020 at 15:10 • 0 commentsThere are several libraries for making a python script executable. Some work for some folk some of the time. I am not sure if they all work for all folk all of the time. I used the cx_freeze library successfully with one of my projects. It looks to still be active. Currently I use pyinstaller.
One issue I found using these packaging managers is that the size of the final executable can seem unreasonably large. Of course, a Python environment needs to be wrapped up in the executable. To minimise the size of this, work in a virtual environment with only the extra modules installed that you need for your script to run. I got this tip from the website here in the post dated
-
Sensory Software Grid 3 control problems
06/29/2020 at 17:08 • 0 commentsThe Python script I wrote to interact with software sends a software keyboard keypress signal. Most packages respond to this. I am having trouble with Sensory Software's Grid 3 package. This softwrae only responds to a software keystroke when the window running the software does not have focus! So if I click on the Grid 3 window, it will not register the software keystrokes transmitted by my script. If I click outside of the window, so that the Grid 3 software no longer has the 'focus', then it does respond to the keystrokes.
Grid 2 would not respond to software keystrokes at all. I had some correspondence with the software developer over this a few years ago. He sent me some sample c# code to interact with the package, but I never got this to work. Which is totally a comment on my lack of coding ability and experience.
That was the reason I set up the Leostick to spoof a physical keyboard key press. The Leostick is a miniature Leonardo board. It shares the ability to appear like a physical keyboard to the Windows operating system.
So, I could set up my script to recognise when the Grid 3 software is in use and focus on e.g. a menu bar or something where the software keystrokes will not activate anything. This is all a bit kludgey. Or I could resurrect using the Leostick. With a Leostick plugged in, there will always be a response from whatever you are trying to control as the Leostick is a real keyboard as far as Windows is concerned.
I listen to the Gnu World Order podcast. The presenter, Klaatu, mentions in one episode that your open source software can only ever be as robust as the weakest closed source element it relies on.