I'm writing a Menu subclass of ui.View to add menus to the Actions menu. The menus auto-populate from the contents of the corresponding sub-directory (I have projects, tools, snippets and documents.) The menus default to running the .py files, with an option to edit (except for snippets which is reversed.)
Because of the ui.in_background issue I think ( http://omz-forums.appspot.com/pythonista/post/4613099080384512 ) the run or edited .py file must end up in the UI thread and freezes when something like a console.alert is encountered.
Can anyone see a way I can work around this?