Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Is webbrowser() blocking - or anything like that - possible ?
-
I have a Pythonista script that processes some end-of-the-month budget stuff with spreadsheets. The script needs several input balance_brought_forward items for several accounts.
I have an "Input.txt" file opened by Textastic app editor with a webbrowser call on iPad. The file has several name-value pairs. I would like the user to update values in the file, and the Python script only continue execution when the user hits the "Pythonista" upper left breadcrumb to return to Pythonista app. Right now, I am halting the program with a silly looking input-prompt: "Hit any key to continue".
Is there a way to handle this blocking issue?
x-callback-URL schema looks promising, but I have been unsuccessful in getting that to work.
I've also looked at subprocess.call(), but that doesn't seem to help either.Suggestions welcomed
-
@richiwalt, to clarify your use case:
Is there a reason the
input.txt
file is being edited in Textastic and not in Pythonista? You could e.g. have a wrench action in Pythonista for ”process this file”.Alternatively, you could have the users edit numbers in a spreadsheet, which they would process with a share action to a Pythonista appex.
-
You could also read the name value pairs, then pop up a dialog, then write the edited values back to the file (thus ensuring well formed files).
Does textastic support x-callback-url?