Repository navigation
Toolbox and editorkit: windows over Pythonista's editor #143
jackatttack
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
For the last few weeks I've been building something I always wanted in Pythonista: my own windows floating over the editor while I work, without leaving the code. It's turned into two things, and I think both are ready for other people to try.
That's Lesson 1 running over its own code: each step explains itself, selects its code and runs when you tap Try it.
Toolbox is the app. It sits in the wrench menu and opens tools over your code:
editorkit is the library underneath, for your own scripts:
Windows can be dragged, resized, folded away, docked in the keyboard's place or pinned to the side, and you can add toolbar buttons and keyboard rows, react to edits, open tabs and switch themes live.
The best way in is the lessons in Toolbox's Learn: ten take you from a first window to a tool of your own in the Toolbox hub, and there's a second set on Pythonista's ui, scene and dialogs modules.
Install: make a new script, paste this in and run it. Run it again any time to update.
Toolbox then appears in the wrench menu. Documents/Toolbox/Uninstall.py takes it all out again.
https://github.com/jackatttack/editorkit
Honest caveats: it uses objc_util to reach Pythonista's own classes, so an app update could break things (please open an issue if it does). It only writes to site-packages-3, Documents/Toolbox and Documents/.editorkit, and anything it replaces goes to Documents/_to_delete rather than being deleted. Mostly tested on iPhone; iPad works but has rough edges.
Feedback very welcome, especially what breaks on your device and what you'd want to build.
All reactions