Forum Archive

Cut/Paste of pyui components

polymerchm

As I contemplate writing a iPhone variant of my chordcalc script, rather that redoing all the gui components I created in the pyui, has anyone played around with hand editing it? I want to convert sections into subviews of three "panels". @omz: it would be nice to do a "group select" and subview those items into a custom view.

dgelessus

Well, pyui files are just plain JSON, and it's very easy to copy around views in text format. It is helpful to pretty-print the JSON file before editing it:

import json

with open("input.pyui", "rb") as infile, open("output.json", "wb") as outfile:
     json.dump(json.load(infile), outfile, indent=4)