How to Disable Auto-Lock in Pythonista

Pythonista, coupled with LLM for vibe coding, is a great way to play around with making your apps come true quickly. No need to pay for a developer account or register it. However, being an iOS Python IDE, there are limitations on what it can mimic. One such limitation was disabling Auto-Lock while a script is running. I’d asked LLMs to fix it more than once, only to crash Pythonista every time.

On Pythonista, simply add the following lines to your script, and the screen will not dim as long as the script is running:

import console
console.set_idle_timer_disabled(True)

From my experience, LLMs often try to use tried-and-tested iOS methods in Pythonista. It won’t work. Aside from the obvious sandboxing issue, Pythonista runs Python code, but LLMs often grab Objective-C or Swift equivalents. It’s one of those moments vibe coding should be able to pull it off, but AIs would not touch the documentation of Pythonista — RTM, as one should put it.

Leave a comment

Comments will be automatically closed after 30 days.