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.


    Outputs from a python script aren't passed to next action in Shortcuts.app

    Pythonista
    shortcuts.app
    2
    3
    2252
    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.
    • kuni255
      kuni255 last edited by

      Hi all !!

      I tried to make the simple shortcut to display string is outputted from a python script in Shortcuts.app. I share the screenshot of this shortcut. You can check this screenshot by accessing here. I translated captions of UI from Japanese to English Because I'm Japanese.

      HelloWorld.py only output "Hello World !!" to standard output. I run this shortcut. But "Hello World !!" is not displayed as instead an empty message box is shown. I understand that "Run script" action runs the specified script and pass standard output to next action as text. Do I misunderstand the specification of "Run script" action ?

      My environment is described in below. Can you advice me about this issue ?

      Pythonista 3 version: 3.2
      iOS version: 12.0.1

      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @kuni255 last edited by cvp

        @kuni255 if, in Shortcuts app, you press the "i " of the "run Pythonista3 script" action, you can see that result is equal to input.
        Thus, your script can't pass data to Shortcut when it is finished, except if you copy your data to clipboard in Pythonista

        import clipboard
        clipboard.set('hello world')
        

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

          @cvp Thank you for your information. I got "Hello World !!" message by transmitting the result of script via clipboard. I misunderstood the specification of "Run script" action Because the quality of translated documentation of actions is a bit worse.

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