Example: air traffic controller

A Python Book: Beginning Python, Advanced ... - Dave's page

A Python BookA Python book : Beginning Python , AdvancedPython, and Python ExercisesAuthor:Dave 1A Python 15, 2013 CopyrightCopyright (c) 2009 Dave Kuhlman. All Rights Reserved. This document is subject to the provisions of the Open Source MIT License document is a self learning document for a course in Python programming. This course contains (1) a part for beginners, (2) a discussion of several Advanced topics that are of interest to Python programmers, and (3) a Python workbook with lots of 2A Python BookContents1 Part 1 Beginning Introductions A general description of Interactive Lexical Names and Blocks and Doc Program Also Code Statements and inspection Built in data Numeric Tuples and The new Unicode Other built in The None Boolean Sets and Functions and Classes

A Python Book A Python Book: Beginning Python, Advanced Python, and Python Exercises Author: Dave Kuhlman Contact: dkuhlman@davekuhlman.org

Tags:

  Python, Beginning, Book, Advanced, Python book, Beginning python, Advanced python

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of A Python Book: Beginning Python, Advanced ... - Dave's page

1 A Python BookA Python book : Beginning Python , AdvancedPython, and Python ExercisesAuthor:Dave 1A Python 15, 2013 CopyrightCopyright (c) 2009 Dave Kuhlman. All Rights Reserved. This document is subject to the provisions of the Open Source MIT License document is a self learning document for a course in Python programming. This course contains (1) a part for beginners, (2) a discussion of several Advanced topics that are of interest to Python programmers, and (3) a Python workbook with lots of 2A Python BookContents1 Part 1 Beginning Introductions A general description of Interactive Lexical Names and Blocks and Doc Program Also Code Statements and inspection Built in data Numeric Tuples and The new Unicode Other built in The None Boolean Sets and Functions and Classes A Assignment import print if: elif: else: for: while: 3A Python continue and break try: except: raise with.

2 Writing a context Using the with: case Functions, Modules, Packages, and The def Returning Local Other things to know about Global variables and the global Doc strings for Decorators for Iterators and Doc strings for A simple Defining The Member Calling Adding Class Class methods and static New style Doc strings for Private Special Debugging 4A Python File input and Unit A simple Unit test Additional unittest Guidance on Unit The Python database Installing Python More Python Features and Part 2

3 Advanced Introduction Python 201 (Slightly) Advanced Python Regular Defining regular Compiling regular Using regular Using match objects to extract a Extracting multiple Replacing multiple Iterator Example A generator Example A class containing a generator Example An iterator Example An iterator class that uses Example A list Example A generator Unit Defining unit Create a test Extending and embedding Introduction and Extension SWIG vs. Extension Extension Special purpose 5A Python Writing a recursive descent parser by Creating a lexer/tokenizer with A survey of existing Creating a parser with Creating a parser with Parsing comma delimited Parsing Parsing names, phone numbers.

4 A more complex GUI A simple message dialog A simple text input dialog A file selection dialog A simple EasyGUI An EasyGUI file open dialog Guidance on Packages and Implementing Using Distributing and Installing End Acknowledgements and See Part 3 Python Lexical Variables and Line Indentation and program Execution Built in Data Literal representations of Operators for Methods on Literal representation of 6A Python Operators on Methods on List Operators on Methods on Raw Unicode Literal representation of Operators on Methods on A few miscellaneous data The booleans True and Assignment print if: statement for: statement while: statement break and continue Exceptions and the try:except: and raise Optional arguments and default Passing functions as Extra args and keyword Order of arguments (positional, extra, and keyword args).

5 Functions and duck typing and Recursive Generators and Object oriented programming and The Inheritance Implementing a Classes and Recursive calls to Class variables, class methods, and static Decorators for classmethod and 7A Python Additional and Advanced Decorators and how to implement Decorators with Stacked More help with A few preliminaries on More help with Applications and XML SAX, minidom, ElementTree, Relational database CSV comma separated value YAML and Part 4 Generating Python Bindings for Generating the Using the generated code to parse and export an XML Some command line options you might want to The graphical front Adding application specific Implementing custom Using the generated "API" from your A combined Special situations and Generic.

6 Type independent Step 1 generate the Step 2 add application specific Step 3 write a test/driver Step 4 run the test Some Children defined with maxOccurs greater than Children defined with simple numeric The type of an element's character Constructors and their default 8A Python BookPrefaceThis book is a collection of materials that I've used when conducting Python training and also materials from my Web site that are intended for self may prefer a machine readable copy of this book . You can find it in various formats here: HTML PDF ODF/OpenOffice , let me thank the students in my Python classes.

7 Their questions and suggestions were a great help in the preparation of these 9A Python Book1 Part 1 Beginning Introductions EtcIntroductionsPractical matters: restrooms, breakroom, lunch and break times, the Python interactive interpreter. Also, IPython and scriptsEditors Choose an editor which you can configure so that it indents with 4 spaces, not tab characters. For a list of editors for Python , see: A few possible editors: SciTE MS Windows only (1) TextPad ; (2) UltraEdit Jed See Emacs See and jEdit Requires a bit of customization for Python See Vim Geany And many interpreters: Python ipython IdleIDEs Also see : PyWin MS Windows only.

8 Available at: WingIDE See Eclipse There is a plug in that supports Python . Kdevelop Linux/KDE See Eric Linux KDE? See http://eric Emacs and SciTE will evaluate a Python buffer within the 10A Python ResourcesWhere else to get help: Python home page Python standard documentation will also find links to tutorials there. FAQs The Python Wiki The Python Package Index Lots of Python packages Special interest groups (SIGs) Other Python related mailing lists and lists for specific applications (for example, Zope, Twisted, etc). Try: Lots of projects.

9 Search for " Python ". USENET Can also be accessed through Gmane: The Python tutor email list documentation: On MS Windows, the Python documentation is installed with the standard installation. Install the standard Python documentation on your machine from pydoc. Example, on the command line, type: pydoc re. Import a module, then view its .__doc__ attribute. At the interactive prompt, use help(obj). You might need to import it first. Example:>>> import urllib>>> help(urllib) In IPython, the question mark operator gives help. Example:In [13]: open?Type: builtin_function_or_methodBase Class: <type 'builtin_function_or_method'>String Form: <built in function open>Namespace: Python builtinDocstring: open(name[, mode[, buffering]]) > file object Open a file using the file() type, returns a file Docstring: (.)

10 Initializes x; see for signaturePage 11A Python BookCallable: YesCall def: Calling definition not docstring: (..) <==> x(..) A general description of PythonPython is a high level general purpose programming language: Because code is automatically compiled to byte code and executed, Python is suitable for use as a scripting language, Web application implementation language, etc. Because Python can be extended in C and C++, Python can provide the speed needed for even compute intensive tasks. Because of its strong structuring constructs (nested code blocks, functions, classes, modules, and packages) and its consistent use of objects and object oriented programming, Python enables us to write clear, logical applications for small and large features of Python : Built in high level data types: strings, lists, dictionaries, etc.


Related search queries