background preloader

A Byte of Python

A Byte of Python

Learn Python The Hard Way, 3rd Edition Welcome to the 3rd Edition of Learn Python the Hard Way. You can visit the companion site to the book at where you can purchase digital downloads and paper versions of the book. The free HTML version of the book is available at Table Of Contents Common Student Questions How long does this course take? You should take as long as it takes to get through it, but focus on doing work every day. What kind of computer do I need? You can do it on most any computer. Video Purchase The Videos For $29.59 For just $29.59 you can get access to all the videos for Learn Python The Hard Way, plus a PDF of the book and no more popups all in this one location. All 52 videos, 1 per exercise, almost 2G of video. When you buy the videos they will immediately show up right here without any hassles. Already Paid? Buying Is Easy Buying is easy.

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, which uses Python 2. If you are using Python 3, you might want to use the second edition, which is here. 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. Earlier Versions Translations and adaptations

The Python Tutorial — Python v2.7.1 documentation Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). This tutorial introduces the reader informally to the basic concepts and features of the Python language and system.

Editors If you have anything to contribute -- e.g. configurations for editors, new editors, or opinion -- don't hesitate to edit or create pages. There's an EditorConfigurationHowto available. Please keep wiki links as wiki links, use external links only if there is no existing page for the editor. Multiplatform Editors Unix-Only Editors Macintosh-Only Editors Online Editors Glorified Editors "IDEs" that don't integrate anything Python-specific go here. Enhanced Python shells Mobile Device Editors "IDEs" that run on mobile devices and tablets. Other Resources Vaults of Parnassus Editor/IDE page. Never ending debate EmacsVsVi CategoryEditors CategoryEditors CategoryEditors CategoryEditors CategoryEditors CategoryEditors CategoryEditors CategoryEditors

Ressources Python Ressources didactiques Gérard Swinnen Vous trouverez ci-dessous : en téléchargement libre, les versions numériques de l'ouvrage "Apprendre à programmer avec Python" de Gérard Swinnen (troisième et cinquième éditions), anciennement publié aux éditions O'Reilly et dorénavant édité chez Eyrolles (ISBN 978-2-212-13434-6) ; le code source des exemples et exercices proposés dans le livre ;Les diapositives et le code source des exemples présentés par G.Swinnen au colloque "Libr'East of Paris" (IUT de Marne-la-vallée) les 23 & 24 Avril 2004 ;Les diapositives de la conférence sur Python présentée à l'IUT de Vannes (Université de Bretagne Sud), le 15 Avril 2005 ;La traduction du livre en hongrois (+ lien vers le site web du traducteur).La traduction du livre en arabe (+ lien vers le site web des traducteurs). Les deux dernières éditions traitent de la version 3 de Python. Au sommaire : Préface. *** Traduction hongroise *** Merci infiniment, Péter ! *** Traduction arabe *** ... Téléchargements

PEP 8 -- Style Guide for Python Code Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such).For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b. This optimization is fragile even in CPython (it only works for some types) and isn't present at all in implementations that don't use refcounting. In performance sensitive parts of the library, the ''.join() form should be used instead.

Python Programming Language -- Official Website Python fr:Préface You have seen how you can reuse code in your program by defining functions once. What if you wanted to reuse a number of functions in other programs that you write? As you might have guessed, the answer is modules. There are various methods of writing modules, but the simplest way is to create a file with a .py extension that contains functions and variables. Another method is to write the modules in the native language in which the Python interpreter itself was written. A module can be imported by another program to make use of its functionality. Example (save as module_using_sys.py): import sys print('The command line arguments are:')for i in sys.argv: print i print '\n\nThe PYTHONPATH is', sys.path, '\n' $ python module_using_sys.py The command line arguments are: module_using_sys.py we are arguments The PYTHONPATH is ['/tmp/py', # many entries here, not shown here '/Library/Python/2.7/site-packages', '/usr/local/lib/python2.7/site-packages'] How It Works 11.1. 11.2. 11.3. 11.4. 11.5.

Related: