Skip to content

Instantly share code, notes, and snippets.

@omz
omz / EmbedPyui.py
Last active Jan 3, 2018
EmbedPyui.py
View 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.