background preloader

Python Module of the Week

Python Module of the Week

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

Dev Explorer - Developing Console Interfaces Using Python and ... Date Published: 18/05/2009 14:39 In general I spend quite a lot of time building python applications and scripts for home and office use. These vary from scripts at home for cleaning up my music library to decent sized applications implementing business logic. One thing that can be quite difficult when carrying out these tasks is interacting with the code I am writing without building a fully fledged interface. When programming this way I use the python curses library to allow me to build a quick temporary command line interface to use and test my application/script. When I first started using curses I found it difficult understand how it worked. In this article I am going to document the basics of python curses programming to help readers understand the concept and curses' benefits. Note Just a quick note to say this is a basic introduction to curses designed to familiarise people who have never used the library before. About Curses The Basics import curses screen = curses.initscr() #!

Text Processing in Python (a book) A couple of you make donations each month (out of about a thousand of you reading the text each week). Tragedy of the commons and all that... but if some more of you would donate a few bucks, that would be great support of the author. In a community spirit (and with permission of my publisher), I am making my book available to the Python community. Minor corrections can be made to later printings, and at the least errata noted on this website. A few caveats: (1) This stuff is copyrighted by AW (except the code samples which are released to the public domain).

6 Books Every Programmer Should Own I’ve seen many lists about the best programming books and I am sure there are a lot of books that are specific to a programming knowledge or technology – that I have not included in my list. The books I have chosen are those that are meant to inspire, increase productivity and improve your programming design skills. Note: This list has no particular order. Code Complete 2 Steve McConnell The main focus of this book to help you improve your programming design skills. The Pragmatic Programmer: From Journeyman to Master Andrew Hunt and David Thomas This book focuses on the best practices of programming (i.e. what you should and should not do). Pragmatic Thinking and Learning: Refactor Your Wetware Andy Hunt From the author of The Pragmatic Programmer, this book takes one-step back from programming and focuses on your everyday thinking and problem solving skills. The Productive Programmer Neal Ford and David Bock Algorithms in a Nutshell George T Heineman, Gary Pollice and Stanley Selkow Thomas H.

IntroductoryBooks The books on this page are all general introductions to the Python language. Most of these books will contain a few chapters on particular applications such as GUI interfaces or Web programming, but won't go into great detail on any one topic; refer to the PythonBooks page for lists of application-specific books. Experienced programmers who prefer a brief and condensed introduction should look at the list of ReferenceBooks. Abhishek Singh Book Overview: Python is the leading language which has its application in every aspect of life which involve technology. This fantastic book will help you to learn and master the python programming language like never before. Basic Introduction to Python Conditional Statements Loops Lists Tuple Dictionary Sets Strings Functions Iterables and Iterators Generators Errors Exception Handling File Handling Regular Expression Amazon: Master Python Programming : Learn Python Like Never Before (Volume 1) Christian Mayer Amazon: The Art of Clean Code Daniel Zingaro

Choose Your Own Pyventure - Wikibooks, collection of open-content textbooks Purpose[edit] This book is the curriculum book for the Twin Cities ExCo (Experimental College) class Bits and Bites: Programming First Steps Do you think that programmers are born with keyboards in their hands? Programmers are made, not born -- you too can code with the best of them. Your facilitators, Gregg and Amanda, come from non-traditional programming backgrounds, and used to be N00bs. Our big project is a web application that allows you to play a "Choose Your Own Adventure" that you write yourself! All instruction is done in the Python language, a free, open-source, cross-platform, powerful yet easy to learn language. Prerequisites: Access to a computer where you can run or install programs. Programmers with experience are also welcome as learners or mentors. Please let us know about any requirements around mobility, neurodiversity, or child-care needs, and we will do our best to meet them. Why Another Python Book? We were inspired by: About the Authors[edit] The Audience[edit] 1a. 1b.

C++ Programming/Exercises/Iterations Iterations[edit] Solutions requirements Solutions must: Use only standard C++.Be compilable.Be in accordance to general coding practices. and should: Handle error situations, even if behavior is not defined. Please do not add solutions that are 99% similar to another that is already present, if it is an improvement just add it to the existing solution. EXERCISE 1[edit] Write a program that asks the user to type an integer and writes "YOU WIN" if the value is between 56 and 78 (both included). int main() {int i; cout << "Type all numbers between 58 and 73: " << endl; cin>>i; if (i>=58 && i<=78) { cout << "YOU WIN" << i << endl; else cout<<"YOU LOSE!" EXERCISE 2[edit] Write a program that asks the user to type all the integers between 8 and 23 (both included) using a for loop. Solution Alternative solution by Bartosz Radwanski //Alternative solution by Bartosz Radwanski//This one allows the numbers to be entered in random order and exits//when all correct numbers have been entered. Alternate solution

Beating the Averages April 2001, rev. April 2003 (This article is derived from a talk given at the 2001 Franz Developer Symposium.) In the summer of 1995, my friend Robert Morris and I started a startup called Viaweb. A lot of people could have been having this idea at the same time, of course, but as far as I know, Viaweb was the first Web-based application. Another unusual thing about this software was that it was written primarily in a programming language called Lisp. The Secret Weapon Eric Raymond has written an essay called "How to Become a Hacker," and in it, among other things, he tells would-be hackers what languages they should learn. Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot. This is the same argument you tend to hear for learning Latin. But wait a minute. Why not? This is not just a theoretical question. Notes

Related: