I am learning Python, (But I like to call it Pythong) and have a few questions to anybody who knows this language. 1. How do I save my program to be viewed on a computer that does not have pythong installed? Doesn't .py files open only when you have pythong installed? 2. How do you create a GUI? Well, that is pretty much it for now... If anybody can answer this for me, I would greatly appreciate it...
Ahhh, to answer my question #2 on making a GUI... Go here:http://boa-constructor.sourceforge.net/ and here: PyGTK
Since there is no section for Python, I guess I will post all of my questions under this thread. I have obtained a script that asks for the user to enter their name. Once the user enters their name and hits enter, an automatic response comes up saying Hi name. I want to take this a step farther and ask the user how they are doing. If the user enters bad, then the reply will be, sorry to hear that + name. If the user enters good, then the reply will be something different. Here is what I have so far: x = raw_input("Enter name:") print "Hey " + x raw_input("How Are You:" ) + x if input = ("bad") print "sorry to hear that " + x raw_input("Press<enter>") Code (markup): I know that I am the noobest of the noobs, but I don't think I have the proper syntax or commands. Can anybody help with this? This would actually open some doors up for me and better understand Python... Thank you to anybody who can help...
x = raw_input("Enter name:") print "Hey " + x y = raw_input("How Are You:") if y == "bad": print "sorry to hear that " + x raw_input("Press<enter>") Code (markup):
WOW!!!! It works... Too cool and thank you!!!!! Now I can add all kinds of different things like: x = raw_input("Enter name:") print "Hey " + x y = raw_input("How Are You:") if y == "bad": print "sorry to hear that " + x if y == "good": print "glad to hear that " + x raw_input("Press<enter>") Code (markup):
Python is more an interpreted language, kinda of script language. Not really to make GUIs, no matter it can be donde, but thats out of the real use of python. If you want to learn windows programming, go direct to .NET (its easier than Python) or C.
No it is not easier. And you can make really great stuff with Python, see "Frets on Fire", it is made using PyGame.