Posts about python


Demonstration on how to switch windows with python

Shows how to get all window and change focus sequentially, could be used to implement your own window switcher.

Printing with Cairo GTK3 and python

Example demonstrating how to draw a graphic and position it on a page for printing complete with preview and printer settings dialog.

Review of "Effective Python"

Short review of "Effective Python"

Review of "App Accomplished"

Short review of "App Accomplished"

Review of "From Mathematics to Generic Programming"

Short review of "From Mathematics to Generic Programming"

Python pixel shading example using point sprites

OpenGL program that does pixel shading, OpenGL pixels with size and textures often used for particle effects.

GTK-3 custom signals example

Simple example on how to setup, connect to and trigger signals.

Draw two cubes using Kivy with different shaders.

Kivy example draw two cubes with different shaders and vertices so they can be moved seperately.

Drawing a cube while rendering widgets

Kivy example on setting up a display and drawing a basic triangle

Draw a textured square with kivy

Kivy example drawing a square and loading an image and applying to the quad as a simple texture.

Draw a simple triangle with kivy

Kivy example on setting up and displaying a basic triangle

GTK-3 Simple opengl app with touch events

Example application mixing gtk, opengl and touch, written as a demo but also as an opengl testing enviroment.

GTK-3 Touchscreen events

Example of catching touch screen events and filtering device type, helpful for making touch friendly gtk apps.

GTK-3 Example downloader using a listbox

Populate a listbox with custom widgets, in this case an example file downloader could be the start of a plugin installer.

GTK-3 OpenGL inside a drawing area

Load a glade file displaying a drawing area widget and setup a context for opengl.

GTK-3 Textview interactions

Load a glade file displaying a textview widget which runs python code on carriage return.

GTK-3 Treeview in treestore mode

Load a glade file displaying a collection of values in a treeview using the treestore hierarchy.

GTK-3 Treeview in liststore mode

Example of using a treeview, the treeview display can be adjusted using different store models in this case we use the liststore model.

GTK-3 Calendars and menus

Load a glade file displaying a menu bar and calendar widget.

App chooer and scale buttons

Load a glade file displaying some scale buttons get value on change, displays some app selector widgets and open the applications.

Displaying dialog boxes

Demonstration of opening various dialog boxes and retrieving the selected values.

Adding progress bars & spinners

Load a progress bar widget and spinner to demonstrate updating and retriving values.

Adding Dropdowns and spin buttons

GTK example of some combo / slecet drop down boxesfor user interaction.

Adding switch and radio widgets

GTK example demonstrating the use of switches and radio buttons.

Adding GTK-3 buttons and switches

GTK Example on click and toggle buttons connect to there events to run code when activated by the user.

Display a GTK window

GTK Example on loading a window from a glade fiel and displaying it on the screen.

Python CAD Tutorial - Developing a cad application Index

Links to all the articles

Python CAD Tutorial 10 - Extending the GTK interface

Add new GUI elements to initiate drawing of various shapes

Python CAD Tutorial 09 - Workspace class

Create a workspace class to hold our objects

Python CAD Tutorial 08 - Drawing a polygon & add generic shape class

Draw a polygon and create a generic shape base class

Python CAD Tutorial 07 - Drawing a grid

Drawing a grid in 3d space using gl lines

Python CAD Tutorial 06 - Drawing planes in 3D space

Drawing planes in 3d space

Python CAD Tutorial 05 - Drawing lines in 3D space

Connect our points from a previous tutorial together with lines.

Python CAD Tutorial 04 - Mouse coordinates in 3D space

Setup the camera so we can see our models.

Python CAD Tutorial 03 - Setup the camera for viewing our scene

Setup the camera so we can see our models.

Python CAD Tutorial 02 - Draw points in 3d Space

How to draw points in 3D space

Python CAD Tutorial 01 - Initial Application

Load a glade file and grab the window and display on the screen, attach the close button so we can close the window.