Disabling SkyWriter software


I am trying to use the SkyWriter Hat along with pyautogui to control a web browser. However with the SkyWriter software actively looking for events the pyautogui software is screwed. This leads to many duplicate letters in the output stream that pyautogui produces. Without the SkyWriter software initialized pyautogui works perfectly.

Is there a way to turn on and off the SkyWriter software actively looking for events? Otherwise it is a project killer.

There is quite a tight deadline on this task so help would be appreciated.


What exact software are you using to drive the Skywriter HAT? Is it a modified version of one of our examples?


I am using the @skywriter.flick() function from the test example, that is all plus the import statements.
import skywriter
import signal
That is all.
Without the imports the pyautogui typewriter function works fine. With them it is slow and many times there are multiple repeats of the same character.


I’m surprised I didn’t catch this sooner, it looks like the method responsible for polling ( _do_poll) gets no sleep, this will mean it’ll run in an brutal, hog-all-the-resources loop to the detriment of anything else you want to do.

If you want to try hacking it, you should be able to just drop in a time.sleep(0.001) ( or whatever value is practical for you ) into the _do_poll method itself.

I’ve dropped this into the GitHub version of the Library: https://github.com/pimoroni/skywriter-hat/commit/184da1b99c9db105aaeab87ff8e459e467648061

I can’t push it to pip until I’ve tested it though!


Thanks, I was hoping it would be something like that. Have you got the path to where that file is in the system.


the easiest would be to follow the instructions under ‘from source’ here:


I’m going to update the library on pip very soon, because this is a completely bonkers oversight that really needs squashing fast! But first… due diligence and testing whatnot!

Update: I’ve now pushed version 0.0.6 which should hopefully fix your problem. Try:

sudo pip install --upgrade skywriter


Thanks, I have tested what you put up yesterday and it appears to be working fine. Thanks.