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.


    Run from GUI

    Pythonista
    compile interpreter com
    2
    2
    1258
    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.
    • Hasthohaha
      Hasthohaha last edited by

      I have a couple of special calculator scripts with GUIs running. Being ignorant, I run them from their scripts by pressing the run button. If I give the files to my friend, he will have to do the same thing. This is bad, because he might accidentally alter the script, since he would be running from the editor. Can these programs be compiled or somehow packaged, so they don’t have to run from the editor? I’m totally self taught, so maybe I’m missing something obvious. I have always run everything from the editor. I don’t know any other way. Is there another way?

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

        @Hasthohaha

        1. you could create an Apple shortcut which starts your script without go via edit/run

        2. you could start your scripts with

        import os
        import sys
        os.chmod(sys.argv[0],0o100444)	# set script as readonly 
        

        to make it as readonly, so your friend would not be able to change your code. Of course, he could always go in command/console mode and reset the flag.

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