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.


    New to programming

    Editorial
    2
    3
    2304
    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.
    • Blotto
      Blotto last edited by

      Hi, I am new to programming anything. I just bought the app and can't figure out the interpreter. I enter the simple examples like >>> 2+2 , I receive the message "you can't run text file" , "no script loaded" . As I said I have no previous experience whatsoever. I just thought I would try it out. Any help would be appreciated.

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

        I don't know what are you doing exactly to access to the intepreter, but obviously it doesn't work how you tried :-)

        There are several ways to run python code. From easy to difficult, they are:

        1. Go to the "Preview" screen. Notice four buttons at top. One of them is "Console". Press it, and you will arrive to a blank screen with a bar at the bottom which has the symbol >. You can write there direct python expressions such as 2+2 (do not write the >>> which is not part of the python language, but the prompt used by standard python interpreter in other operating systems). The answer appears in the blank area.
        2. The approach in 1 is good for small snippets, but if you want to write something longer, press the button "Python Scratchpad". Write your program there and run it pressing the "▶ " button. Note that, since you are not in the console anymore, expressions such as 2+2 will not print any result by default. If you want to see the result of an expression, you have to print it, eg: print 2+2
        3. As part of a workflow. Once you are confident with you python skills, you can write python code which is executed as part of a workflow. For that, you have to use the "Run python script" action from the Action Library. Typically you'll want that your script can have access to other workflow variables, such as the selection or the input. This is somewhat advanced stuff, so better leave it for the future.
        1 Reply Last reply Reply Quote 0
        • Blotto
          Blotto last edited by

          Hi, Merry Christmas! I thank you for the information, I see how it works now. I cannot thank you enough.

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