Okay, i am pretty fluent with python, and a few other languages. Can you be a little bit more specific in what kind of help?
Offline
Ideas wrote:
The basics and where to start
Okay, can we start tonight?
Offline
I will do this in parts
Launching and Creating Python programs
Python can be programmed via the interactive command line (aka the interpreter or IDE) but anything you code won't be saved. Once you close the session it all goes away. To save your program, it's easiest to just type it in a text file and save it in the foo.py format.
To use the interpreter, type python at the command prompt (*nix and Mac) or launch the Python IDE (Windows and Mac). Here are two versions of what you should see (the first is an example from the bash shell, the second example is from the MacPython IDE):
Generic Code Example:
cpe-70-95-108-53:~ codyjackson$ python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Generic Code Example:
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)]
Type "copyright", "credits" or "license" for more information.
MacPython IDE 1.0.1
>>>
The >>> is the Python command prompt; your code is typed here and the result is printed on the following line, without a prompt. For example:
Generic Code Example:
>>>print "Hello World!"
Hello World!
>>>spam = "yum"
>>>
By the way, Python was named after Monty Python, not the snake. Hence, much of the code you'll find on the 'net, tutorials, and books will have references to Monty Python sketches.
If you want to run a Python program, simply type python at the shell command prompt (not the IDE) followed by the program name.
Generic Code Example:
$python foo.py
Files saved with the .py extension are called modules and can be called individually at the command line or within a program like header files. More information on working with modules can be found in the Python documentation.
That's it for Part 1. I know it's not much but in the next installment I'll start talking about the types and operators available in Python.
Briefly, Python has the same implementations that C does, except that the largest types are used (such as double floats and long integers) and several new features are added to make programming easier, like lists and dictionaries.
Offline