Skip to content

Instantly share code, notes, and snippets.

@omz
omz / EmbedPyui.py
Last active December 21, 2021 21:17
EmbedPyui.py
# coding: utf-8
'''
This is a little helper script to make it easier
to create single-file scripts with Pythonista, while
still taking advantage of the UI editor.
It'll essentially convert the .pyui file to a compact
string representation that you can embed directly
in your script. The code to unpack and load the UI
is also auto-generated for convenience.