background preloader

Dive Into Python

Dive Into Python

s Python Class - Educational Materials Welcome to Google's Python Class -- this is a free class for people with a little bit of programming experience who want to learn Python. The class includes written materials, lecture videos, and lots of code exercises to practice Python coding. These materials are used within Google to introduce Python to people who have just a little programming experience. The first exercises work on basic Python concepts like strings and lists, building up to the later exercises which are full programs dealing with text files, processes, and http connections. The class is geared for people who have a little bit of programming experience in some language, enough to know what a "variable" or "if statement" is. Beyond that, you do not need to be an expert programmer to use this material. This material was created by Nick Parlante working in the engEDU group at Google. Tip: Check out the Python Google Code University Forum to ask and answer questions.

The Hitchhiker’s Guide to Python! Greetings, Earthling! Welcome to The Hitchhiker’s Guide to Python. This is a living, breathing guide. This handcrafted guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis. This guide is opinionated in a way that is almost, but not quite, entirely unlike Python’s official documentation. Let’s get started! Getting Started with Python New to Python? Properly Install Python Writing Great Python Code This part of the guide focuses on the best-practices for writing Python code. Scenario Guide for Python Applications This part of the guide focuses on tool and module advice based on different scenarios. Shipping Great Python Code This part of the guide focuses on deploying your Python code. Python Development Environments This part of the guide focus on the Python development environment, and the best-practice tools that are available for writing Python code. Additional Notes Note

Code Like a Pythonista: Idiomatic Python In this interactive tutorial, we'll cover many essential Python idioms and techniques in depth, adding immediately useful tools to your belt. There are 3 versions of this presentation: ©2006-2008, licensed under a Creative Commons Attribution/Share-Alike (BY-SA) license. My credentials: I am a resident of Montreal,father of two great kids, husband of one special woman,a full-time Python programmer,author of the Docutils project and reStructuredText,an editor of the Python Enhancement Proposals (or PEPs),an organizer of PyCon 2007, and chair of PyCon 2008,a member of the Python Software Foundation,a Director of the Foundation for the past year, and its Secretary. In the tutorial I presented at PyCon 2006 (called Text & Data Processing), I was surprised at the reaction to some techniques I used that I had thought were common knowledge. Many of you will have seen some of these techniques and idioms before. These are the guiding principles of Python, but are open to interpretation. import this

What Are the Best Books / Courses for Learning Python? Building Skills in Python — Building Skills in Python A Programmer’s Introduction to Python Legal Notice This work is licensed under a Creative Commons License. Attribution. For any reuse or distribution, you must make clear to others the license terms of this work. Language Basics The Processing View A programming language involves two closely interleaved topics. This part describes the most commonly-used Python statements, sticking with basic numeric data types. Some of the examples in this part refer to the rules of various common casino games. We’ll provide a little background on Python in Background and History. In Simple Numeric Expressions and Output we’ll introduce the print statement (and print() function); we’ll use this to see the results of arithmetic expressions including the numeric data types, operators, conversions, and some built-in functions. We’ll introduce variables, the assignment statement, and input in Variables, Assignment and Input, allowing us to create simple input-process-output programs. Data Structures Sequences.

Python XML Processing What is XML? The Extensible Markup Language (XML) is a markup language much like HTML or SGML. This is recommended by the World Wide Web Consortium and available as an open standard. XML is a portable, open source language that allows programmers to develop applications that can be read by other applications, regardless of operating system and/or developmental language. XML is extremely useful for keeping track of small to medium amounts of data without requiring a SQL-based backbone. XML Parser Architectures and APIs: The Python standard library provides a minimal but useful set of interfaces to work with XML. The two most basic and broadly used APIs to XML data are the SAX and DOM interfaces. Simple API for XML (SAX) : Here, you register callbacks for events of interest and then let the parser proceed through the document. SAX obviously can't process information as fast as DOM can when working with large files. SAX is read-only, while DOM allows changes to the XML file. The parse Method: #!

Think Complexity by Allen B. Downey Buy this book from Amazon.com. Download this book in PDF. Read this book online. Description This book is about complexity science, data structures and algorithms, intermediate programming in Python, and the philosophy of science: Data structures and algorithms: A data structure is a collection that contains data elements organized in a way that supports particular operations. This book focuses on discrete models, which include graphs, cellular automata, and agent-based models. Complexity science is an interdisciplinary field---at the intersection of mathematics, computer science and physics---that focuses on these kinds of models. Free books! This book is under the Creative Commons Attribution-NonCommercial 3.0 Unported License, which means that you are free to copy, distribute, and modify it, as long as you attribute the work and don't use it for commercial purposes. Download the LaTeX source code (with figures and a Makefile) in a zip file.

7. Input and Output — Python 2.7.9 documentation There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities. 7.1. Fancier Output Formatting So far we’ve encountered two ways of writing values: expression statements and the print statement. (A third way is using the write() method of file objects; the standard output file can be referenced as sys.stdout. Often you’ll want more control over the formatting of your output than simply printing space-separated values. The string module contains a Template class which offers yet another way to substitute values into strings. One question remains, of course: how do you convert values to strings? The str() function is meant to return representations of values which are fairly human-readable, while repr() is meant to generate representations which can be read by the interpreter (or will force a SyntaxError if there is no equivalent syntax). Some examples: '! 7.1.1.

Think Python: How to Think Like a Computer Scientist How to Think Like a Computer Scientist by Allen B. Downey This is the first edition of Think Python. Buy this book at Amazon.com Download Think Python in PDF. Read Think Python in HTML. Example programs and solutions to some problems are here (links to specific examples are in the book). Description Think Python is an introduction to Python programming for beginners. Some examples and exercises are based on Swampy, a Python package written by the author to demonstrate aspects of software design, and to give readers a chance to experiment with simple graphics and animation. Think Python is a Free Book. If you have comments, corrections or suggestions, please send me email at feedback{at}thinkpython{dot}com. Other Free Books by Allen Downey are available from Green Tea Press. Download Precompiled copies of the book are available in PDF. Python 3.0 Most of the book works for Python 2.x and 3.0. Michael Kart at St. Earlier Versions Translations and adaptations

Related: