About the source code. I will try to embed python in C application. I will use a simple python script. This is a simple example using pygame python module.

Make a new folder and named Python_C using these commands in the shell:

Let’s see the C source… Continue Reading Embedding python in C under Fedora 16.

XSS attacks allow a user to inject client-side scripts into the browsers of other users. Using Django templates protects you against the majority of XSS attacks. To do this you need to protect your templates this code:

If you need to disable auto-escaping for an individual variable, then use… Continue Reading XSS sanitization on django – variables and templates

Today I will show how to use the pstats python module. It’s just some simple example, but can be useful for us.

Let’s add some source code to test this python module.

The documentation tells us: A profiler is a program that describes the run time performance of… Continue Reading Using pstats python module .

Although most of us prefer the python version 2.6, today I tried to install the latest version of Django and Python 2.3.2. Make a new folder, named test-dj.

On the official site, I got the two archives:

I will start with the installation of python. We unzip the… Continue Reading Python 3.2 and Django 1.4 – installation.

Simple python script to start the OpenOffice software. This script starts OpenOffice software. The script uses the following modules:

Now we define the arguments for each software OpenOffice:

The next step, we define a function that will start OpenOffice software. See below:

We use a variable to… Continue Reading Python and OpenOffice – Start OpenOffice.

Sometimes it is necessary to resize the images. The PIL module is used for image processing. The glob module takes a wildcard and returns the full path of all files and directories matching the wildcard. Here are two scripts that I made. The first is a simple example using a… Continue Reading How to resize images – python script .

The official site www.python.org says: Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report… Continue Reading Python – simple language scripting.

Start Blender 3D version 2.5 or higher. At the top, choose File from the menu and then User Preferences … or press keys Ctrl+Alt+U. See the picture below: Click the button Install Add-on … A dialog will appear and you can select the script with that addon. In this case… Continue Reading Addons on Blender 2.5 – Installing an addon using Python