omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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 ?

    Pythonista
    3
    3
    1245
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • richiwalt
      richiwalt last edited by

      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

      mikael 1 Reply Last reply Reply Quote 0
      • mikael
        mikael @richiwalt last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors