Intro to Python
-
- Python is an interpreted language which was originally designed to "
appeal to Unix/C hackers".
- It is currently the "glue" in scientific computation.
- It is a major tool in sytems administration.
- It is outstanding for rapid prototyping.
- Python has a vast library of add on features available.
- Numpy for numerical computation.
- scipy in general for scientific computataions.
- Many different graphing packages.
- Twisted is an outstanding IPC package.
- Python has been through three versions
- Versions 1 and 2 are mostly compatable.
- Version 3 (CS 2008) is not backwards compatable
- Making the choice can be difficult
- I have a bunch of python 2 code I need to convert some day :(
- But Fedora has finally switched to python 3.
- It depends on the libraries you are using
- But both are usually installed on most systems.
- Python2 is what is installed on cslab101, both are on the other machines.
- For our exploration it won't make that mutch difference.
- A major goal was readablitiy.
- This was a reaction to obscure schell scripts for ((expr;expr;expr)); do expr done
- You can run the interpreter or in a script
- Basically, if you know C/C++ you can python.
- You use indentation to mark code blocks.
- ; are optional, but it doesn't yell at you if you put them in
- print much like the shell in python 2
- print() in python 3
- I highly reccomend the Python Tutorial
- Look at first.py