background preloader

CherryPy - Trac

CherryPy - Trac
Related:  Python

tuto-PyQt-zero.1 Les amis, le temps n'est plus aux bavardages mais au concret ! Ce tutoriel est basé sur l'excellentissime tutoriel C++ Je n'ai fait que l'adapter aux spécificité de python et PyQt Pour bien pouvoir comprendre cette partie, il est vital que vous sachiez ce qu'est la POO (Programmation Orientée Objet) et que vous connaissiez Python. Nous commencerons dans un premier temps par découvrir ce qu'est PyQt concrètement, ce que cette bibliothèque permet de faire, et quelles sont aussi les alternatives qui existent (car il n'y a pas qu'avec PyQt qu'on peut créer des fenêtres !).Nous supposeron que PyQt est déjà installé et configuré. Préparez-vous bien, parce que dès le chapitre suivant on attaque dare-dare ! Sommaire du chapitre : Voilà une question que vous vous êtes tous déjà posés, j'en suis sûr ! Alors alors, c'est comment qu'on programme des fenêtres ? Douuucement, pas d'impatience. Programme sans GUI (console)

Bottle Python framework + Google App Engine | Rutwick Gangurde's Blog Hi fellas, hope you’re already flying high with GAE and have your own Amazon product store set up after reading my previous post series on how to Set up an Amazon Book Store on Google App Engine! GAE supports a number of Python web frameworks. See what the Google App Engine site says: ” Google App Engine supports any framework written in pure Python that speaks CGI (and any WSGI-compliant framework using a CGI adaptor) ” One such framework is ‘Bottle’. Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. Bottle might not be a full fledged framework like Django, Pylons etc. but I may say it is ideal for small to medium applications. In this small article I’ll explain how to use Bottle with Google App Engine. Lets start with the prerequisites: Google App Engine and Python 2.5: Download and install Python 2.5 from here. and the GAE sdk for Python from here. Extract the downloaded Bottle tar archive, copy the file ‘bottle.py’ to ‘framework’. Here’s the ‘data’ template:

Learning Python Qt Programming with PyQt & PySide | Query7 Introduction Qt is a cross platform application framework that is made up of not only a GUI widget toolkit, but also classes for working with OpenGL, SQL databases, threading, network protocols (HTTP, FTP, UDP, TCP) and much more. Currently Python has two separate bindings for the Qt framework: Pyside and PyQt. In this post we look at Pyside and PyQt and the resources that exist for learning them. Pyside or PyQt? Both Pyside and PyQt have full Python bindings for Qt 4.7 and are available for Mac, Windows and Linux. Because Pyside is a relatively young project the majority of articles and tutorials on the web are titled with PyQt. Qt Designer Qt Designer is a layout and forms GUI builder. Learning Python Qt An Introduction to PyQt by Mark Mruss of LearningPython is an excellent beginners introduction to PyQt. Jan Bodnar of Zetcode has written a great series of tutorials introducing PyQt 4. Books There are currently two books that cover Python Qt4.X and one book that covers Python Qt2.X.

Bottle: Python Web Framework Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library. Routing: Requests to function-call mapping with support for clean and dynamic URLs.Templates: Fast and pythonic built-in template engine and support for mako, jinja2 and cheetah templates.Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.Server: Built-in HTTP development server and support for paste, fapws3, bjoern, gae, cherrypy or any other WSGI capable HTTP server. Example: “Hello World” in a bottle from bottle import route, run, template @route('/hello/<name>')def index(name): return template('<b>Hello {{name}}</b>!' Run this script or paste it into a Python console, then point your browser to Download and Install User’s Guide Start here if you want to learn how to use the bottle framework for web development. License

PyQt Un livre de Wikilivres. À l'heure actuelle, l'informatique occupe une place de plus en plus importante dans notre quotidien. Les gens désirent avoir un outil qui soit convivial, pratique et simple à utiliser. Les interfaces graphiques ont subi d'énormes évolutions depuis les début de l'informatique personnelle. Elles sont toujours plus pratiques à utiliser, plus simples, plus esthétiques. Il existe une multitude de librairies permettant de créer des interfaces, certaines plus simples à prendre en main que d'autres, certaines plus complètes. Introduction Installation Concepts de base Quelques widgets Utilisation de Qt Designer Guide de traduction de Qt à PyQt Traduction de Qt à PyQt Annexes

Requests: HTTP for Humans The Tetris game in PyQt4 HomeContents In this chapter, we will create a Tetris game clone. Tetris The Tetris game is one of the most popular computer games ever created. The original game was designed and programmed by a Russian programmer Alexey Pajitnov in 1985. Since then, Tetris is available on almost every computer platform in lots of variations. Tetris is called a falling block puzzle game. Figure: Tetrominoes PyQt4 is a toolkit designed to create applications. Creating a computer game is a good way for enhancing programming skills. The development We do not have images for our tetris game, we draw the tetrominoes using the drawing API available in the PyQt4 programming toolkit. Some ideas behind the game: We use a QtCore.QBasicTimer() to create a game cycle.The tetrominoes are drawn.The shapes move on a square by square basis (not pixel by pixel).Mathematically a board is a simple list of numbers. The code consists of four classes: a Tetris, a Board, a Tetrominoe and a Shape. #! self.tboard.start() Figure: Tetris

How to Deploy Python WSGI Applications Using a CherryPy Web Server Behind Nginx Introduction Chances are you found yourself asking one of these questions after reading this tutorial's title: Why should I use CherryPy's pure-Python web server instead of a "real" stand-alone (perhaps C based) one for my WSGI application?CherryPy...Isn't that a framework? What's that got to do with the deployment of my Bottle, Flask etc. based application? There are many good answers and reasons for both. Glossary 1. CherryPy WSGI Web Server In BriefWhy Deploy With CherryPy's WSGI Web Server? 2. Updating the default operating systemSetting up Python, pip and virtualenvCreating a Virtual (Python) EnvironmentDownloading and installing CherryPyDownloading and installing Nginx 3. WSGIWSGI Application Object (Callable): wsgi.pyCreating a script to use CherryPy Web Server: server.pyRunning the server 4. 5. Understanding CherryPy and Using Nginx CherryPy as a whole is a minimalist Python Web Framework. CherryPy WSGI Web Server In Brief CherryPy Web Server's Highlights: We will begin with: python-dev:

Installing Eclipse on Ubuntu 10.04 and Configuring PyDev | M.Serhat Dündar What is Eclipse? Eclipse is an open source community whose projects are focused on building an extensible development platform, runtimes and application frameworks for building, deploying and managing software across the entire software lifecycle. Many people know eclipse as a Java IDE but Eclipse is much more than a Java IDE. Check this for more : What More than a Java IDE? Eclipse is a IDE for; Java , JavaEE, C, C++, C#, PHP, Javascript, Mobile Development, RCP & RAP, UML, Error handling, Maven, Python, Ruby.. Check Download Place ; and Marketplace (for plugins, bundles etc.) ; Installing Eclipse on Ubuntu 10.04 Lts I’m gonna talk about the easiest way to install eclipse on ubuntu, you can find other ways like terminal installitions or more like that. You can use the Ubuntu Software Manager as the easiest way. (Applications => Ubuntu Software Manager) Select “eclipse” and “Install” it.

Flask (A Python Microframework) Pygame Un livre de Wikilivres. Avant propos[modifier | modifier le wikicode] Ce livre est un wiki et peut par conséquent être amélioré par tout le monde. N'hésitez pas à participer ! 1) Ceci est la traduction de la documentation de pygame présente sur le site [archive] . 2) Cette traduction est approximative et parfois trop mot à mot, si une tournure vous gêne, vous pouvez la corriger ou en parler sur la page de discussion. 3) Ce n'est pas une traduction de la documentation de référence de Pygame, celle-ci étant disponible à l'adresse [1] . Sommaire[modifier | modifier le wikicode] Introduction à Pygame Une introduction aux bases de Pygame. Importation et initialisation Premiers pas sur l'importation et l'initialisation de Pygame. Déplacer une image Un tutoriel de bases couvrant les concepts derrière l'animation 2D par ordinateur. Chimp - Ligne par ligne Les exemples de Pygame incluent un petit programme avec un poing interactif et un singe. Introduction au module Sprite

Real Python! Blog - Python programming through practical examples The following is a guest post by Jeff Knupp, author of Writing Idiomatic Python. Jeff currently has a Kickstarter campaign running to turn the book into a video series - check it out! A few months ago, I grew tired of the digital goods payment service I used to sell my book and decided to write my own. Two hours later, bull was born. It was a little application written using Flask and Python, which turned out to be an excellent choice for implementation. It started with bare bones functionality: A customer could enter their details in a Stripe JavaScript pop-up, bull would record their email address and create a unique id for the purchase, then associate the user with the content they purchased. It worked fantastically well. I loved it too, but for a slightly different reason: since bull was running on my web server, I could get a much richer set of analytics than if I had to send customers to a third-party site for payment. The User Model

How do I create a .pyc file? Python automatically compiles your script to compiled code, so called byte code, before running it. When a module is imported for the first time, or when the source is more recent than the current compiled file, a .pyc file containing the compiled code will usually be created in the same directory as the .py file. When you run the program next time, Python uses this file to skip the compilation step. One reason that a .pyc file may not be created is permissions problems with the directory. This can happen, for example, if you develop as one user but run as another, such as if you are testing with a web server. Running a script is not considered an import and no .pyc will be created. If you need to create a .pyc file for a module that is not imported, you can use the py_compile and compileall modules. The py_compile module can manually compile any module. >>> import py_compile >>> py_compile.compile('abc.py') python -m compileall . >>> def hello(): ... print "hello!"

The Pylons Project Documentation

Related: