There are numerous good Python tutorials on the web, please look at
this one for starters:
Python Tutorial
If you already know Perl or PHP, Python is easy as it is very similar. You
can create functions and even classes. Python can be totally object
oriented. Once you learn the syntax differences it is not difficult. Note, that
unlike PHP, Python does not have a direct interface with html code. You
can not use "?PYTHON" as you would "?PHP" to embed
Python code. However you can use the same CGI
(Common Gateway Interface) that you use in Perl language programming.
Let us start out real simple. This is the
hello_linux_python.cgi
Here is the source code:
source
Here is the Fibonaci Series example which I did in Perl earlier.
fibonacci_python.cgi
Here is the source code:
source
And Finally for all you folks to show that Python is as good as PHP, I have
taken my commands.php script and converted it to a Python script. Note,
they look identical, but I have left the Python Commands printing in black
and white instead of the normal yellow/green I use. To see it work click
Python Command Database List Example
Here is the source code:
source