I'm playing around with Python and it's not like any other language. It's like you can only do one simple thing and then you press "Enter" and whatever you typed in comes out. For example, you type print "Hello" and press Enter and then Hello comes out, but how do you write more advanced programs, like If-Then stuff.
Python is weird
Started by Sionofdarkness, Jul 22 2006 12:42 PM
3 replies to this topic
#1
Posted 22 July 2006 - 12:42 PM
|
|
|
#2
Guest_priorityone_*
Posted 06 January 2007 - 03:38 AM
Guest_priorityone_*
Hi, I came across this article that may help you with learning program with Python: Please let me know if this helps any?
A Tutorial Introduction to the Python Programming Language > Running Python
A Tutorial Introduction to the Python Programming Language > Running Python
#3
Posted 07 March 2007 - 08:19 PM
It sounds to me like you are using IDLE (a Python IDE). I believe that if you click New Window (Ctrl+N) in the File menu, it will open up a new window in which you can type multi-line code that does not execute line by line after each return. You may want to check out IDLE - an Integrated DeveLopment Environment for Python, the site for IDLE on Python.org. Hope this helps.
#4
Guest_Ludwig_*
Posted 20 April 2007 - 10:15 AM
Guest_Ludwig_*
Let me assure you that Python is not weird. You just got caught in the Python Shell program, the one with the goofy >>> prompts. That utility is for testing short lines of code.
If you read through Python tutorials, you find a lot of this silly >>> shell code as examples. It really does a diservice to Python since it royally confuses any beginner and discourage them from using Python. I was one of those people.
Regular Python code is written in an editor, saved as a file with a .py extension. In Windows you can just double click on the file and python.exe will compile and interpret/run it. Actually it is best to use one of the many Python editors, where you run your code right from the editor. They also do other handholding chores like indentation, code completion, error detection and so on.
One of the better Python editors is PyScripter (written in Delphi), google for it, it is free.
If you read through Python tutorials, you find a lot of this silly >>> shell code as examples. It really does a diservice to Python since it royally confuses any beginner and discourage them from using Python. I was one of those people.
Regular Python code is written in an editor, saved as a file with a .py extension. In Windows you can just double click on the file and python.exe will compile and interpret/run it. Actually it is best to use one of the many Python editors, where you run your code right from the editor. They also do other handholding chores like indentation, code completion, error detection and so on.
One of the better Python editors is PyScripter (written in Delphi), google for it, it is free.


Sign In
Create Account


Back to top









