[Tutor] finalizing code

Bspymaster bspymaster at gmail.com
Fri Aug 26 00:56:06 CEST 2011

Hello! I recently started programming in python (I use IDLE with python 2.7
on ubuntu 11.04, by the way) and recently made a program (no interface) that
launches other programs. The problem I'm having is that when I gave my
friend the code, he had to get an editor to use the code. How do I make it
so that when you open the program, it starts the code (so anyone can use it,
not just those who have idle and know ow to program python)? Sorry if this
is unclear. I basically want to make a stand- alone command line application
(or one that boots in terminal). It's very basic and runs like so (except
longer and slightly more complex):

loop = 1
> while loop == 1:
>     choice = raw_input(">")
>     if choice == "prog1":
>         print "Launching Prog1"
>         os.system("prog1")
>         loop = 0
>     else:
>         print "invalid program. Try again."

God Bless,
Ben Schwabe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110825/4ce97f55/attachment.html>

More information about the Tutor mailing list