background preloader

VPython

VPython
Related:  gui stuff

Model–view–controller Model–view–controller (MVC) is a software pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.[1][2] The central component, the model, consists of application data, business rules, logic and functions. A view can be any output representation of information, such as a chart or a diagram. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants. The third part, the controller, accepts input and converts it to commands for the model or view.[3] Component interactions[edit] A typical collaboration of the MVC components In addition to dividing the application into three kinds of components, the Model–view–controller (MVC) design defines the interactions between them.[4] Use in web applications[edit] History[edit] See also[edit]

coding style - What is a clean, pythonic way to have multiple constructors in Python Blog personal de Pablo Tilli Python programming - creating PyQt4 gui applications, language introduction tutorials Interesting Articles IronPython introduction for Python developers - A quick look at IronPython for Python / Linux developersScripting Ximea machine vision cameras in IronPython - Imaging with Ximea cameras using IronPython scriptsWorking with virtualenvs using virtualenvwrapper - How to manage and use multiple virtualenv instances using virtualenvwrapperTokyo Cabinet and Python - Tokyo Cabinet is a scalable key-value database that can be used in high performance applications, including Python.Using MongoDB in Python and PHP - MongoDB is a no-relational document database. Pylons Pylons and nginx - How to run pylons on nginxPylons on cherokee - How to run pylons on cherokee Google Wave RkTaggy - example Google Wave robot - RkTaggy is an example Google Wave robot written in Python. Tests and Benchmarks

Graphics with Matplotlib Matplotlib is a large and sophisticated graphics package for Python written in object oriented style. However, a layer built on top of this basic structure called pyplot accesses the underlying package using function calls. We describe a simple but useful subset of pyplot here. 4.1 Line plots 4.1.1 Simple plots Let’s type the following into Python: >>> from numpy import * >>> import matplotlib.pyplot as plt >>> x = arange(0.,10.,0.1) >>> y = sin(x) >>> ll = plt.plot(x,y) >>> plt.show() >>> The first two lines import respectively the numpy and matplotlib pyplot modules. Calls to most pyplot functions return stuff that can sometimes be used in subsequent functions. Text such as a title, labels, and annotations can be added to the plot between the plt.plot and the plt.show commands. The resulting plot is shown in figure 4.2. 4.1.2 Multiple lines and points More complicated plots with multiple lines and line types can be made: The resulting plot is shown in figure 4.3. 4.2 Log plots and histograms

ZetCode, tutorials for programmers wxDesigner - dialog editor, RAD tool, IDE for wxWidgets, wxPython, wxPerl and wx.NET Learn Python - Free Interactive Python Tutorial Cómo hacer Widgets con PyGTK y Cairo. Éste tutorial está basado originalmente en ésta obra extraí­da de www.pygtk.org, no es una tradudcción literal, y extiende su contenido. NOTA: Para poder ejecutar el código vamos a necesitar la versión 2.8 de pygtk y pycairo. Primeros Pasos Lo primero que debemos hacer es importar las librerias que vamos a necesitar: import gtkimport gtk.gdkimport math Lo siguiente será; crear una nueva clase, que heredará de la clase gtk.DrawingArea (área de dibujado) que es el area que utilizaremos para capturar los eventos y dibujar en ella el resultado de las funciones que utilicemos en cairo, añadiremos también un constructor por defecto: class SemiCirculo(gtk.DrawingArea): def __init__(self): gtk.DrawingArea. class SemiCirculo(gtk.DrawingArea): def __init__(self): gtk.DrawingArea. Prueba Inicial El fichero fuente deberia éstar tal que asi: ejemplo_1.py Lo ejecutamos, y obtenemos el siguiente resultado: [arc@synaptia:~]$ python2.4 ejemplo_1.py Dibujando Creando eventos nuevos #Desplazamiento self.desp = 0

pyFLTK Home Page

Related: