background preloader

Python

Facebook Twitter

Iep - the Interactive Editor for Python. Twisted Documentation: Twisted Documentation. Go to the latest version of this document. Introduction Executive summary Connecting your software - and having fun too! Getting Started Networking and Other Event Sources Twisted Internet A brief overview of the twisted.internet package. Reactor basics The event loop at the core of your program. Using SSL in Twisted Add some security to your network transport. UDP Networking Multicast too! Using processes Launching sub-processes, the correct way.

Introduction to Deferreds Like callback functions, only a lot better. Index Version: 13.2.0. PyFlickrStreamr 0.1. Package Index > PyFlickrStreamr > 0.1 Not Logged In Status Nothing to report PyFlickrStreamr 0.1 Download PyFlickrStreamr-0.1.tar.gz PyFlickrStreamr provides a continuous, blocking python interface for streaming Flickr photos in near real-time. ============= PyFlickrStreamr ============= PyFlickrStreamr provides a continuous, blocking python interface for streaming Flickr photos in near real-time. Downloads (All Versions): 5 downloads in the last day 38 downloads in the last week 179 downloads in the last month Website maintained by the Python community Real-time CDN by Fastly / hosting by Rackspace / design by Tim Parkin. Nullege: A Search Engine for Python source code. The Eric Python IDE. Package Index. Qt 4.6: Model/View Programming. Try Python: Interactive Python Tutorial in the Browser.

Interactive Shell. S Python Class - Google's Python Class - Google Code. 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. Python Programming. Python Programming From Wikibooks, open books for an open world Jump to: navigation, search This book describes Python, an open-source general-purpose interpreted programming language available for a broad range of operating systems. There are currently three major implementations: the standard implementation written in C, Jython written in Java, and IronPython written in C# for the .NET environment. There are two common versions currently in use: 2.x and 3.x. This book describes primarily version 2, but does at times reference changes in version 3. Contents[edit] Intro[edit] Overview Getting Python Setting it up Interactive mode Self Help Basics[edit] Creating Python programs Variables and Strings Basic syntax Sequences (Strings, Lists, Tuples, Dictionaries, Sets) Data types Numbers Strings Lists Tuples Dictionaries Sets Basic Math -- redundant to "Operators" Operators Control Flow Decision Control Conditional Statements Loops Functions Scoping Input and output Files Text Modules Classes Exceptions Errors Idioms Decorators.

Referencia de la Biblioteca de Python. Documentación de Python. Python Programming/PyQt4. WARNING: The examples on this page are a mixture of PyQt3 and PyQt4 - use with caution! This tutorial aims to provide a hands-on guide to learn the basics of building a small Qt4 application in Python. To follow this tutorial, you should have basic Python knowledge. However, knowledge of Qt4 is not necessary. I'm using Linux in these examples and am assuming you already have a working installation of Python and PyQt4. >>> import PyQt4 If no error message appears, you should be ready to go. The examples in this tutorial as easy as possible, showing useful ways to write and structure your program. Hello, world! Let's start easy: popping up a window and displaying something.

. #! About 7 lines of code, and that's about as easy as it can get. A Button[edit] Let's add some interaction! #! You can imagine that coding this way is not scalable nor the way you'll want to continue working. . #! GUI Coding[edit] ... so we want to use Qt3 Designer for creating our GUI. Pyuic testapp_ui.ui -o testapp_ui.py #! PyQt4 tutorial. This is PyQt4 tutorial. The tutorial is suited for beginners and intermediate programmers. After reading this tutorial, you will be able to program non trivial PyQt4 applications. PyQt5 tutorial is the successor of this tutorial. Table of contents E-book A unique e-book covering advanced features of the PyQt4 library: Advanced PyQt4 tutorial. Related tutorials To refresh your knowledge of the Python language there is a Python tutorial on ZetCode. wxPython tutorial, PyGTK tutorial and Tkinter tutorial are tutorials for other popular Python GUI bindings.

Introduction to PyQt4. Home > Python and PyQt4 > Introduction to PyQt4 Creating an application in PyQT4 may be done in a few ways. The most common one is to use QTDesigner, which we get with QT. QTDesigner let us draw the GUI which is very handy for complicated interfaces. We can place widgets on the window, add names etc. To create an application in PyQT4 you have to: Create the GUI in QTDesignerSet names in the Property Editor to ease coding of the application (QTDesigner)Using pyuic4 create the python GUI classCall the application using that GUI classExtend it with our own slotsWhen you use a widget you go to PyQt's Classes and check methods of each used widgets. The method names as "setText" are very easy to understand. Tutorials List Introduction We start with a "Hello... We choose simple Widget, which will give us a simple window. Right-Click on the pushButton will allow us to change its caption (displayed text). A Signal-Slots window should appear: The signal is clicked() and slot is close.

And run it: Notes. Popular Python recipes. Parsing - Convert html to plain text in VBA. Creando archivos xls en Python y Avanzado « Rctorr's Blog. Y siguiendo con lo retos, ahora el primero es como adicionar estilos y formatos a un celda de un archivo xls desde Python por su puesto, hee que si fuera desde Calc o Excel sería pan comido o talves no! … Los obtejtivos que me interesa poder lograr son: Asignar tipo de fuenteAsignar tipo de letraAsignar tamaño de letraAsignar alineaciónAsignar bordeAsignar formatoAsignar ancho y alto Sigo trabajando con la la clase xls_writer.py que hasta el momento me ha resultado genial y que invita incluso a extenderla para incluir nuevos métodos, sin embargo la documentación viene de la mano de xlwt.

Hay una clase llamada xlwt.easyxf que formatea una cadena del tipo ‘font: bold on; align: wrap on, vert centre, horiz center’ y regresa una instancia que puede ser usando en el método sheet.write, un ejemplo sería como el sigue: el resultado es el siguiente: También comentar que he tenido que modificar el método writer.append() para que acepte la opción del formato en xls_writer.py y el resultado es: Salud!! Programa como un Pythonista: Python Idiomático. En este tutorial interactivo, trataremos en profundidad algunos modismos y técnicas esenciales de Python, añadiendo así algunas herramientas útiles a tu caja de herramientas. ©2006-2008, licenciado bajo Creative Commons Attribution/Share-Alike (BY-SA).

Mis credenciales: Soy un habitante de Montreal,padre de dos grandes niños, marido de una mujer muy especial,programador en Python a tiempo completo,autor del proyecto Docutils y de reStructuredText,un editor de las Propuestas de Mejora de Python (Python Enhancement Proposals o PEPs),uno de los organizadores de la PyCon 2007, y coordinador de PyCon 2008,un miembro de la Fundación de Software Python,Director de la Fundación el año pasado, y su Secretario actual. En el tutorial que presenté en la PyCon 2006 (llamado Procesamiento de Datos y Texto), me sorprendí de las reacciones que coseché con algunas técnicas que utilicé y que yo pensaba que eran bastante conocidas.

En caso de duda: import this Pruébalo en el intérprete de Python: Bien: Mal: #! Python-twitter - A python wrapper around the Twitter API. GitHub is now the "source of truth" but I will always try to update to this project page. A Python wrapper around the Twitter API Author: The Python-Twitter Developers <python-twitter@googlegroups.com> Introduction This library provides a pure Python interface for the Twitter API. Twitter ( provides a service that allows people to connect via the web, IM, and SMS. Building From source: Install the dependencies: Download the latest python-twitter library from: Extract the source distribution and run: $ python setup.py build $ python setup.py install Testing With setuptools installed: $ python setup.py test Without setuptools installed: $ python twitter_test.py Getting the code View the trunk at: Documentation Using Todo.

Python. 2. Writing the Setup Script. The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the setup script is to describe your module distribution to the Distutils, so that the various commands that operate on your modules do the right thing. As we saw in section A Simple Example above, the setup script consists mainly of a call to setup(), and most information supplied to the Distutils by the module developer is supplied as keyword arguments to setup().

Here’s a slightly more involved example, which we’ll follow for the next couple of sections: the Distutils’ own setup script. (Keep in mind that although the Distutils are included with Python 1.6 and later, they also have an independent existence so that Python 1.5.2 users can use them to install other module distributions. The Distutils’ own setup script, shown here, is used to install the package into Python 1.5.2.) #! 2.1. In your setup script. 2.2. Py_modules = ['mod1', 'pkg.mod2'] 2.3. Overview. Recetario - PyAr - Python Argentina. Nuestro CookBook, en vías desarrollo. A este lugar uno recurre cada vez que se encuentra en la cocina de Python, cuchillo en mano y se da cuenta que a sus ingredientes le faltan el toque de un cheff experto. Nuestra especialidad son las recetas autóctonas. ¿Platos magistrales que fallan al sazonar con acentos y eñes? ¿números que saben mal si no son previamente fritos en castellano?

¡Siga leyendo! 1. Configuracion del entorno python 1.1. Recetario/CreandoUnNuevoProyectoPython: Receta para crear un entorno de trabajo y un esqueleto minimo para un nuevo proyecto Python 1.2. Autocompletado en consola interactiva: tip sobre como agregar autocompleción con tab en la consola interactiva imitando el comportamiento ipython. 2. 2.1. 3. 3.1. /ExtraerMails de un texto utilizando el módulo re. 4. 4.1. aLetras aLetras : Función que al recibir un número lo convierte a letras. 4.2. Reverse : Función que invierte los caracteres. 4.3. validar_cuit 4.4. digito_verificador_modulo10 4.5. 4.6. 5. 5.1. 5.2. 6. 6.1.

Proyectos basados en Python - Python majibu. Esta sección pretende aglutinar una colección de proyectos de software desarrollados completamente o en su gran mayoría en Python y que gocen de cierta relevancia. Como complemento a esta sección, existe una similar para aglutinar los proyectos en los que son creadores o colaboradores principales los usuarios de este sitio, Proyectos de usuarios de majibu. Framework web Gestor de contenidos (CMS) Servidor web Herramienta Web RESTx Comprobar Rendimiento Web Cloud Computing para despliegues en Django / Python Cloud Computing OpenStack Wiki Blog Generadores de contenido estático (HTML) Foro PyForum Framework de red (event-driven) twisted Clientes de Twitter Planeta / Lector RSS Protocolo P2P / descarga directa Gestor de listas de correo Mailman Webmail Posterity Servidor SMTP Lamson Simulador de redes complejas Mineria de datos Web (Crawler/Scrapper) Herramienta para redes sociales Plataforma Q&A MOOC (Educación a distancia) edX Plataforma gestión escuelas SchoolTool Herramienta AntiSpam Spambayes Control de versiones Sphinx.

Writing a Package in Python. Home by Tarek Ziadé Intents of this article are: To shorten the time needed to set up everything before starting the real work, in other words the boiler-plate codeTo provide a standardized way to write packagesTo ease the use of a test-driven development approachTo facilitate the releasing process It is organized in the following four parts: A common pattern for all packages that describes the similarities between all Python packages, and how distutils and setuptools play a central role How generative programming ( can help this through the template-based approach The package template creation, where everything needed to work is setSetting up a development cycle A Common Pattern for All Packages The easiest way to organize the code of an application is to split it into several packages using eggs. Applications for a given company can have a set of eggs glued together with a master egg. setup.py, the Script That Controls Everything sdist test.

Tree for pyside-examples in PySide - Qt by Digia. Shackra - resumen del usuario - Python majibu. Trabajando con templates, archivos y condicionales. En el capítulo anterior, estuvimos modificando nuestro programa: creamos una lista de precios y agregamos plantillas HTML y TXT para imprimir los presupuestos. Vimos como utilizar tuplas, listas y diccionarios e incorporamos una nueva estructura de control mediante el bucle for en el proceso de creación y utilización de listas de precios para nuestro programa. En el capítulo de hoy, veremos cómo logramos utilizar plantillas para generar nuestros presupuestos y el proceso para guardarlos. Comenzaremos con algo sencillo y sumamente práctico: lectura y escritura de archivos. Lectura y escritura de archivos Al trabajar con archivos, existen cuatro acciones básicas que podemos hacer con un archivo: Abrir un archivoLeer un archivoEscribir/sobrescribir un archivoCerrar un archivo abierto Cuando abrimos un archivo podemos hacerlo con diversos fines: Abrirlo para leerloAbrirlo para escribirloAbrirlo para leerlo y escribirlo, etc En la línea 103 abrimos un archivo para leerlo: Importación de módulos.

Web scraping: Reliably and efficiently pull data from pages that don't expect it. Mechanize. WebKit in PyQt - rendering web pages.