How to become a proficient Python programmer | Munen Alain M. Lafon Spoiler: This post is primarily gonna be an excerpt of my bookmarks collection. That’s because more intelligent men than me have already written great articles on the topic of how to become a great Python programmer. I will focus on four primary topics: Functional programming, performance, testing and code guidelines. Functional programming Writing code in an imperative style has become the de facto standard. If you don’t know what I’m talking about, that’s great. Performance There’s so much talk going on about how inefficient these ‘scripting languages’ (Python, Ruby, …) are, that it’s easy to forget that very often it’s the algorithm chosen by the programmer that leads to horrible runtime behaviour. Those articles are a great place to get a feel for the ins and outs of Python’s runtime behaviour, so you can get your high performing application writting in a language that is concise and fun to write. Testing Testing is probably one the most misjudged topics in computer science these days.
BeginnersGuide New to programming? Python is free and easy to learn if you know where to start! This guide will help you to get started quickly. Chinese Translation New to Python? Read BeginnersGuide/Overview for a short explanation of what Python is. Getting Python Next, install the Python 3 interpreter on your computer. There are also Python interpreter and IDE bundles available, such as Thonny. At some stage, you'll want to edit and save your program code. Learning Python Next, read a tutorial and try some simple experiments with your new Python interpreter. If you have never programmed before, see BeginnersGuide/NonProgrammers for a list of suitable tutorials. Most tutorials assume that you know how to run a program on your computer. Some sites offer in-browser coding for those who want to learn Python: Print a cheat sheet of the most important Python features and post it to your office wall until you know the basics well. Need Help? Need help with any of this? Complete list of Beginner's Guide pages
Откуда идут «функциональные» корни Python / Python Я никогда не полагал, что Python попадет под влияние функциональных языков, независимо от того что люди говорят или думают. Я знаком с императивными языками, такими как C и Algol68 и хотя я сделал функции объектами «первого класса», я не рассматривал Python как язык функционального программирования. Однако, было ясно, что пользователи хотят больше от списков и функций. Операции над списками применялись к каждому элементу списка и создавали новый список. Например: def square(x): return x*x vals = [1, 2, 3, 4] newvals =  for v in vals: newvals.append(square(v)) На функциональных языках, таких как Lisp и Scheme, операции, такие как эта были разработаны как встроенные функции языка. def map(f, s): result =  for x in s: result.append(f(x)) return result def square(x): return x*x vals = [1, 2, 3, 4] newvals = map(square,vals) Тонкость вышеупомянутого кода в том, что многим людям не нравился факт, что функция применяется к элементам списка как набор отдельных функций.
Portal:Python programming From Wikipedia, the free encyclopedia Selected article The IPython interactive shell running in gnome-terminal on Ubuntu 11.04, showcasing the introspection and system shell command features. A number of popular articles in the computer press have discussed the advantages of IPython, and it is a component of the SciPy package. IPython can also be used as a system shell replacement, especially on Windows which has a minimally capable shell. read more Selected biography Van Rossum was born and grew up in the Netherlands, where he received a masters degree from the University of Amsterdam in 1982. read more Categories Quotes Quotations related to Python at Wikiquote Purge server cache
Improving your programming style in Python -- Gaël Varoquaux: computer / data / brain science Here are some references on software development techniques and patterns to help write better code. They are intended for the casual programmer, and certainly not an advanced developer. They are listed in order of difficulty. Software carpentry These are the original notes from Greg Wilson’s course on software engineering at the university of Toronto. Software design for maintainability My own post A case of shameless plug: this is a post that I wrote a few years ago. Writing a graphical application for scientific programming using TraitsUI Building interactive graphical application is a difficult problem. General Object-Oriented programming advice Designing Object-oriented code actually requires some care: when you are building your set of abstractions, you are designing the world in which you are going to be condemned to living (or actually coding). Go Top
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. This will ensure that concatenation occurs in linear time across various implementations.Comparisons to singletons like None should always be done with is or is not, never the equality operators.Also, beware of writing if x when you really mean if x is not None -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context!
Twisted Twisted is an event-driven networking engine written in Python and licensed under the open source MIT license. Twisted runs on Python 2 and an ever growing subset also works with Python 3. Twisted makes it easy to implement custom network applications. Here's a TCP server that echoes back everything that's written to it: from twisted.internet import protocol, reactor, endpoints class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() endpoints.serverFromString(reactor, "tcp:1234").listen(EchoFactory()) reactor.run() Learn more about writing servers, writing clients and the core networking libraries , including support for SSL, UDP, scheduled events, unit testing infrastructure, and much more. Twisted includes an event-driven web server. Learn more about web application development, templates and Twisted's HTTP client. Twisted includes a sophisticated IMAP4 client library.
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. Email me at <firstname.lastname@example.org> . A few caveats: (1) This stuff is copyrighted by AW (except the code samples which are released to the public domain).
www.celles.net: Python Interfaces graphiques (toolkits) pour Python Tk (TkInter) wxWidgets (wxPython) Qt PyQt - licence PySide - licence LGPL Autres Pmw Mega Kivy - crossplatform framework for NUI (smartphone - tactile multipoint...) TraitsUI (wxPython) (PyQT) GUI Designer for TkInter Vérification / Lint Divers AFPY - Association Francophone PYthon Conférences News, Planet... Doc Livres Cloud