Banner 468x 60

Thursday, March 4, 2010

Learning with Python 2nd

Soldier of Love
This book owes its existence to the collaboration made possible by the Internet and the free software movement. Its three authors—a college professor, a high school teacher, and a professional programmer—never met face to face to work on it, but we have been able to collaborate closely, aided by many other folks who have taken the time and energy to send us their feedback.
We think this book is a testament to the benefits and future possibilities of this kind of collaboration, the framework for which has been put in place by Richard Stallman and the Free Software Foundation.

Read more ...

Friday, February 19, 2010

How to Think Like a Computer Scientist Learning with Python



This book is now available for sale at Lulu.com. Hardcopies are no longer available from Green Tea Press.
How to Think... is an introduction to programming using Python, one of the best languages for beginners.
How to Think... is a Free Book available under the GNU Free Documentation License. Readers are free to copy and distribute the text; they are also free to modify it, which allows them to adapt the book to different needs, and to help develop new material.

Download

The book is available in a variety of electronic formats:
  • Precompiled copies of the book are available in PDF and Postscript . Users are free to download and print these files.
  • The LaTeX source code for the book is available as a gzipped tar file.
  • The HTML version of the book is also available if you prefer to read it online. Or you can download all the HTML pages in a gzipped tar file. 





    Read more ...

    Thursday, February 18, 2010

    Invent Your Own Computer Games with Python


     
    "Invent Your Own Computer Games with Python" is a free e-Book that teaches you how to program in the Python programming language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the example.
    "Invent with Python" was written to be understandable by kids as young as 10 to 12 years old, although it is great for anyone of any age who has never programmed before.
    This second edition has revised and expanded content, including using the Pygame library to make games with graphics, animation, and sound.
     
    Download
    Table of content :
     
    Chapter HTMLRelated Content
    Chapter 1 - Installing Pythonweb page
    Chapter 2 - The Interactive Shellweb page
    Chapter 3 - Stringsweb page
    Chapter 4 - Guess the Numberweb page
    Chapter 5 - Jokesweb page
    Chapter 6 - Dragon Realmweb page
    Chapter 7 - Flow Chartsweb page
    Chapter 8 - Hangmanweb page
    Chapter 9 - Tic Tac Toeweb page
    Chapter 10 - Bagelsweb page
    Chapter 11 - Cartesian Coordinatesweb page
    Chapter 12 - Sonarweb page
    Chapter 13 - Caesar Cipherweb page
    Chapter 14 - Reversiweb page
    Chapter 15 - AI Simulationweb page
    Chapter 16 - Graphics and Animationweb page
    Chapter 17 - Collision Detection and Inputweb page
    Chapter 18 - Sound and Imagesweb page
    Chapter 19 - Dodgerweb page
    Appendix A - Differences between Python 2 and 3
    Appendix B - Statements, Functions, and Methods Reference
    Appendix C - Running Python Programs Without Python Installed





    Read more ...

    Sunday, January 17, 2010

    Dive Into Python 3



    Mark Pilgrim's Dive Into Python 3 is a hands-on guide to Python 3 (the latest version of the Python language) and its differences from Python 2. As in the original book, Dive Into Python, each chapter starts with a real, complete code sample, proceeds to pick it apart and explain the pieces, and then puts it all back together in a summary at the end.
    This book includes:
    • Example programs completely rewritten to illustrate powerful new concepts now available in Python 3: sets, iterators, generators, closures, comprehensions, and much more
    • A detailed case study of porting a major library from Python 2 to Python 3
    • A comprehensive appendix of all the syntactic and semantic changes in Python 3
    This is the perfect resource for you if you need to port applications to Python 3, or if you like to jump into languages fast and get going right away.

    What you'll learn

    • Understand Python 3 code by seeing it broken down and explained
    • Make full use of the latest Python features such as iterators, generators, closures, classes and comprehensions
    • Refactor existing code to improve maintainability
    • Learn how to serialize Python objects with the pickle protocol and JSON format
    • Learn how to package your own Python libraries and upload them to the Python Package Index to share your projects with Python developers worldwide
    • Use Python 3 to consume HTTP web services
    • Port existing Python applications to Python 3 by following a case study for a major library

    Who is this book for?

    • Anyone who wants to learn the latest version of Python in a fast, hands-on fashion
    • Existing Python programmers who want to learn quickly how to make the most of the features of the latest version of Python and port their code to it
    • Programmers coming from other languages wanting a fast introduction to Python that gets them thinking about advanced concepts quickly
    Table of content:
    1. What’s New in “Dive Into Python 3”
    2. Installing Python
    3. Your First Python Program
    4. Native Datatypes
    5. Comprehensions
    6. Strings
    7. Regular Expressions
    8. Closures & Generators
    9. Classes & Iterators
    10. Advanced Iterators
    11. Unit Testing
    12. Refactoring
    13. Files
    14. XML
    15. Serializing Python Objects
    16. HTTP Web Services
    17. Case Study: Porting chardet to Python 3
    18. Packaging Python Libraries
    19. Porting Code to Python 3 with 2to3
    20. Special Method Names
    21. Where to Go From Here
    Download:

    The book is freely licensed under the Creative Commons Attribution Share-Alike license. You can download it as HTML or PDF.
    Read more ...

    Saturday, January 2, 2010

    Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel

    Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel
    If you are a developer for the GNU/Linux system, this book will help you to:

    • Develop GNU/Linux software that works the way users expect it to.


    • Write more sophisticated programs with features such as multiprocessing, multi-threading, interprocess communication, and interaction with hardware devices.


    • Improve your programs by making them run faster, more reliably, and more securely.


    • Understand the preculiarities of a GNU/Linux system, including its limitations, special capabilities, and conventions.

    Title
    File
    Filesize
    md5 checksum
    Front Matter and Table of Contents
    pdf
    1273361
    fe0c601b919879e93d79d25a78818b5c
    Chapter 01 - Advanced Unix Programming with Linux
    pdf
    235835
    5923f2a5d7fb4f941fe905fbe45be196
    Chapter 02 - Writing Good GNU/Linux Software
    pdf
    280326
    44c823c1240c7f70a6dc9dbfddbe03fa
    Chapter 03 - Processes
    pdf
    241758
    87b5d98ba5b5933cf2ad1dbcf37641aa
    Chapter 04 - Threads
    pdf
    292419
    11f392b44c073498e9ec9b3f718e54e7
    Chapter 05 - Interprocess Communication
    pdf
    289853
    0de9b56476a0e6e536fbac68e09b02d2
    Chapter 06 - Mastering Linux
    pdf
    268821
    ab8940fbcc40018d72bd2016e662afba
    Chapter 07 - The /proc File System
    pdf
    258582
    b3fe701f67a37ad7ba7233bcdc3f5d90
    Chapter 08 - Linux System Calls
    pdf
    261352
    583182dc09bc8b3c3773ba6d0fc710f2
    Chapter 09 - Inline Assembly Code
    pdf
    204992
    c226e58fc7bf544df477d8ae96b680ed
    Chapter 10 - Security
    pdf
    288441
    fc340b97e9c7f3fc2f5fe4dd71132ffd
    Chapter 11 - A Sample GNU/Linux Application
    pdf
    298215
    50a205644e441ae26d2041567d131b82
    Appendix A - Other Development Tools
    pdf
    272377
    09a9a79a3c3abe6869df3f1ab5b39b14
    Appendix B - Low Level I/O
    pdf
    252755
    3eaa0f0bbd103e1cc7872663e227a14b
    Appendix C - Table of Signals
    pdf
    177879
    3b02a6abb38877580b743392b98c3290
    Appendix D - Online Resources
    pdf
    148074
    372964ff1eb4f85aca3985736a06cc48
    Appendix E - Open Publication License Version 1.0
    pdf
    176596
    5b1ddb8d38b6a44b357345ba6c25010e
    Appendix F - The GNU General Public License
    pdf
    228793
    e207c51489e6f3cfafba5b13bb5e3bd9
    Index
    pdf
    1253094
    004eefcfc2c6dca9a21233e748b81f35
    Read more ...

    Monday, December 14, 2009

    Introduction to Computing Explorations in Language, Logic, and Machines

    Introduction to Computing

    Explorations in Language, Logic, and Machines



    This book is a survey introduction to the most important ideas in
    computing. It focuses on how to describe information processes by
    defining procedures, how to analyze the costs required to carry out
    a procedure, and the fundamental limits of what can and cannot be
    computed mechanically.

    Contents

    Contents and Index [PDF] (11 pages)

    Introduction

    Chapter 1: Computing [PDF] (19 pages)

    Part I: Defining Procedures

    Chapter 2: Language [PDF] (17 pages)
    Chapter 3: Programming [PDF] (20 pages)
    Chapter 4: Problems and Procedures [PDF] (24 pages)
    Chapter 5: Data [PDF] (33 pages)
    [List Procedures Code, Pegboard Code]

    Part II: Analyzing Procedures

    Chapter 6: Machines [PDF] (21 pages)
    Chapter 7: Cost [PDF] (29 pages)
    Chapter 8: Sorting and Searching [PDF] (36 pages) [Code]

    Part III: Improving Expressiveness

    Chapter 9: Mutation [PDF] (17 pages)
    Chapter 10: Objects [PDF] (18 pages)
    Chapter 11: Interpreters [PDF] (27 pages) [Charme Interpreter Code]

    Part IV: The Limits of Computing

    Chapter 12: Computability [PDF] (16 pages)
    Chapter 13: Intractability (not yet available)


    Download entire book
    Read more ...

    Friday, November 13, 2009

    Object-Oriented Design and Programming in Python


    How do you move from OO programming to OO design? Do a lot of design focused on building a sophisticated application program. This 222-page book has 43 chapters that will help you build OO design skills through the creation of a moderately complex family of application programs. This is a step-by-step guide to OO design and implementation using either the Java or Python programming languages.

    Parts of the text were reworked on 6/16/08 to clarify some questions from readers. The changes are minor amplifications of a few keys points. They cover some notes on testing, agility and rework, two ongoing themes that can’t be emphasized enough.

    Also, four new appendices were added to provide examples of how best to use unit testinfg and documentation tools. This includes javadoc and JUnit for Java developers. For Python, it includes unittest, doctest and epydoc.

    Read more ...

    Tuesday, November 10, 2009

    Think Python How to Think Like a Computer Scientist

    Think Python is the manuscript of Python for Software Design, published by Cambridge University Press.

    In support of Free Books, Cambridge has agreed to keep this manuscript available under the GNU Free Documentation License. Readers are free to copy and distribute the text; they are also free to modify it, which allows them to adapt the book to different needs, and to help develop new material.

    Read it here HTML version
    Download PDF version

    Example programs and solutions to some problems (links to specific examples are in the book).

    Here

    Read more ...

    Tuesday, September 29, 2009

    Dive Into Python 3




    Bytes vs. strings comes up again and again throughout the book.

    * In Files, you’ll learn the difference between reading files in “binary” and “text” mode. Reading (and writing!) files in text mode requires an encoding parameter. Some text file methods count characters, but other methods count bytes. If your code assumes that one character == one byte, it will break on multi-byte characters.
    * In HTTP Web Services, the httplib2 module fetches headers and data over HTTP. HTTP headers are returned as strings, but the HTTP body is returned as bytes.
    * In Serializing Python Objects, you’ll learn why the pickle module in Python 3 defines a new data format that is backwardly incompatible with Python 2. (Hint: it’s because of bytes and strings.) Also JSON, which doesn’t support the bytes type at all. I’ll show you how to hack around that.
    * In Case study: porting chardet to Python 3, it’s just a bloody mess of bytes and strings everywhere.

    ---------------------


    --------------------------
    Read more ...

    Thursday, July 2, 2009

    Python Essential Reference (3rd Edition)


    Every so often a book comes along that makes you ask yourself, "Gee, when was the last time I had my eyes checked?" David M. Beazley's Python: Essential Reference is just such a book. Condensing thousands of pages of Python online documentation into a compact 319-page softcover, Beazley and his editors used the old-college trick (often performed in reverse) of dickering with the font size to meet a putative page-limit requirement. The result is a truly condensed product fit for the occularly well-adjusted (nota bene).

    Beazley's subject is Python, a full-featured, freely-redistributable, POSIX-compliant (platforms include Linux, Unix, Macintosh, and Windows) scripting language that is based on object-oriented design principles. As advertised, Beazley's source release (1.5.2) is available from an unfortunately slow server at www.python.org. The installation under Linux (Redhat 5.2) proceeded without incident.

    Beazley holds true to his catalogic purpose: fully 230 pages are formatted as technical appendices and indices covering the standard litany: built-in function syntax, database features, OS-level interfaces, Internet interfaces, and compiling/profiling/debugging. All references are fully annotated and illustrated with example source code that runs from a couple of lines to a couple of pages. In lock step with competing scripting languages, Python is extensible and embeddable in C and C++, and with blitzkrieg efficiency, Beazley summarizes these crucial practical issues in the final 30 pages. Python users who are tired of chasing questions through hyperlinked online documents will benefit from the expansive random-access index.

    Python the book captures the orderliness of Python the language. Beazley begins with an 86-page précis of Python in the fashion of Kernighan and Ritchie: too brief for a newbie tutorial but enough to propel old hands into a scripting language that aspires to the elegance of a compiled language.

    Indeed, it is a byte-compiling language. The line bytecode=compile("some_python_script",'','exec')) creates 'bytecode' as a token executed by exec bytecode. But a five-minute investigation through Beazley's book does not describe how 'bytecode' can be written into a separate executable file. If writing the byte-compiled code to a file is not possible, Python suffers from the limitations of other scripting languages: the executable is the source and cannot be hidden from the user, at least not without some difficulty. Despite its extensibility, embeddability, and pleasing architecture, Python is like other scripting languages: appropriate for solving small nonproprietary problems.

    Those familiar with more established scriptors like Perl may ask, "Why Python?" Unlike Perl, Python is a product of the fully object-oriented (OO) era, and its constructs reflect design principles that aspire beyond keystroke shortcuts of the succinct-but-often-arcane Perl. Python creator Guido van Rossum cleansed Perl's idiosyncracies and objectified basic data structure, data manipulations, and I/O. With Python, OO is so intrinsic that learning Python is equivalent to learning OO. The same cannot be said of Perl.

    Unfortunately, comparisons with other languages are missing from Beazley's book. Van Rossum, in an embarrassingly self-serving foreword, preemptively asserts that we readers need "neither evangelizing nor proselytizing"--after all, we already own the book--but we do need galvanizing and we don't find it. Specifically, we need a response to the oft-repeated wisdom that new computer languages are only worth learning if they teach us to organize our thinking along new lines.

    Scripting languages, however, are for quick and dirty projects: quick to write, easy to hack, and ultimately disposable. The essential tension created by van Rossum and friends is between the elegance of object-oriented principles and the utility of a quick-hacked script. Sadly, the tension remains unresolved in Beazley's reference. There is little to convince us that Python has earned its place in the firmament by changing our thinking. But Beazley has given us much to get us going if we have already taken the leap of faith. --Peter Leopold --This text refers to an out of print or unavailable edition of this title.


    Download:
    Read more ...

    Wednesday, July 1, 2009

    CherryPy Essentials: Rapid Python Web Application Development: Design, develop, test, and deploy your Python web applications easily

    Design, develop, test, and deploy your Python web applications easily

    • Walks through building a complete Python web application using CherryPy 3
    • The CherryPy HTTP:Python interface
    • Use CherryPy with other Python libraries
    • Design, security, testing, and deployment

    In Detail

    CherryPy is a Python library for web development that allows developers to build web applications in the same way as any other object-oriented Python program. Enriched by several years of active development, it has become one of the most established toolkits for building solid and high-performance web applications in Python. CherryPy abstracts the complex low-level HTTP protocol into an easy-to-use interface that respects Python idioms. The library aims at being simple to learn for a beginner while offering the most advanced features to fluent Python developers. For these reasons CherryPy was chosen to be at the heart of the popular and feature-rich TurboGears web framework. CherryPy-powered web applications are stand-alone Python applications with their own embedded multi-threaded web server, but can also run behind Apache or IIS for scalability.

    What you will learn from this book?

    • The book will be about CherryPy 3
    • CherryPy installation using the tarball, egg, and subversion
    • The CherryPy library in depth: its design and how to use it
    • Using CherryPy with common Python and non-Python products
    • Object Relational Mapping with SQLObject, SQLAlchemy, and Dejavu
    • Web Services via REST and the Atom Publishing Protocol
    • AJAX and client-side scripting via MochiKit
    • Unit, functional, and load testing
    • CherryPy, Apache, and lighttpd deployment solutions

    Approach

    The book starts with two chapters dedicated to CherryPy, its history and installation. It then moves through a gentle introduction to the main features and concepts of CherryPy to a thorough review of its core capabilities. After laying this foundation the book dives into a real-world example, detailing important steps in the creation of a photoblog application. These chapters cover database manipulation via Object Relational Mapping (ORM), using web services to enhance the application, and client-side scripting through AJAX. Finally, the book covers the need for unit, functional, and performance testing before closing with deployment solutions for a CherryPy-based application.

    Who this book is written for?

    This book is principally geared towards Python web developers, who are looking to add the power of the CherryPy library to their existing Python skillset. It assumes a good working knowledge of Python. Although the CherryPy toolkit is at the core of the book, many other common libraries are introduced

    Download:

    Read more ...

    Wednesday, June 24, 2009

    Beginning Python: From Novice to Professional




    Beginning Python: From Novice to Professional
    is the most comprehensive book on the Python ever written. Advanced topics, such as extending Python and packaging/distributing Python applications, are also covered.

    Ten different projects illustrate the concepts introduced in the book. You will learn how to create a P2P file-sharing application and a web-based bulletin board, and how to remotely edit web-based documents and create games.

    About the Author
    Magnus Lie Hetland is an associate professor of algorithms at the Norwegian University of Science and Technology, NTNU. Even though he loves learning new programming languages--even quite obscure ones&emdash;Magnus has been a devoted Python fan and an active member of the Python community for many years, and is the author of the popular online tutorials "Instant Python" and "Instant Hacking. When he isn't busy staring at a computer screen, he may be found reading (even while bicycling), acting (in a local theater group), or gaming (mostly role-playing games).

    Download:

    http://rapidshare.com/files/248334648/Python.rar


    Mirror:
    http://rapidshare.com/files/248335853/Python1.rar
    Read more ...

    OReilly Learning Python 3rd Edition


    The authors of Learning Python show you enough essentials of the Python scripting language to enable you to begin solving problems right away, then reveal more powerful aspects of the language one at a time. This approach is sure to appeal to programmers and system administrators who have urgent problems and a preference for learning by semi-guided experimentation.

    First off, Learning Python shows the relationships among Python scripts and their interpreter (in a mostly platform-neutral way). Then, the authors address the mechanics of the language itself, providing illustrations of how Python conceives of numbers, strings, and other objects as well as the operators you use to work with them. Dictionaries, lists, tuples, and other data structures specific to Python receive plenty of attention including complete examples.

    Authors Mark Lutz and David Ascher build on that fundamental information in their discussions of functions and modules, which evolve into coverage of namespaces, classes, and the object-oriented aspects of Python programming. There's also information on creating graphical user interfaces (GUIs) for Python applications with Tkinter.

    In addition to its careful expository prose, Learning Python includes exercises that both test your Python skills and help reveal more elusive truths about the language. --This text refers to an out of print or unavailable edition of this title.

    Review
    As a book for programmers who want to learn Python, it does a very good job. The coverage is informative and well order; making it easy to find what you're looking for. Overall, if you do some work with Python, you will benefit from owning this book. " - Sam Smith, news@UK, March "This book is a good example of Python culture, in the clarity of its text as much as in the quality of its code. Anyhone working their way through it will have a solid foundation upon which to explore Python's potential. Highly recommended." - Ivan Uemilianin, CVu, October 2004


    Download:

    http://rapidshare.com/files/248314324/Python.rar
    Read more ...
     
    Book Slip