Run from GUI
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 last edited by
you could create an Apple shortcut which starts your script without go via edit/run
you could start your scripts with
import os import sys os.chmod(sys.argv,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.