python
Capturing a screen image with python and PIL on Windows
The more I use Python, the more I love it.
This programming language is simply awesome: with it's simple api and the huge amount of freely available additional modules creating complex applications is really easy and fast.
For example less than 15 minutes ago I wondered: how can I capture an image of the computer screen using Python?
If you don't know Python you might think that this could be pretty a complex task.
- fabio's blog
- 7 comments
- Read more
- 1636 reads
A simple django basename template filter tag
I'm using Django, a python coded framework to develop web applications, to implement a project for the University.
During the development I needed to have a template tag which, given a path to a file, just returns its basename (just as it do the python os.path.basename).
So I implemented it. Following you have the code for it.
- fabio's blog
- 4 comments
- Read more
- 2133 reads
Python: call a function with more arguments on each element of a list
I'm recently working a lot with Python because I understood it perfectly fits my needs being powerful, clean and fast to develop with it.
If you program with it there are good chances that you will end up using lot of lists which are pretty well designed and powerful in Python.
A really useful function in Python is map() which let you execute one function on each element of a list:
L = [0.1, 0.4, 0.7] L2 = map(round, L) print L2 #output [0.0, 0.0, 1.0]
- fabio's blog
- 3 comments
- Read more
- 2673 reads
Serial RS232 connections in Python
Here at ULPGC I'm following a Robotics course. In the practical part of the exam we have to write some applications to operating some didactics robots we have (Rhino XR-4 and SCARA Robots).
Each robot is connected to a Controller (Rhino Mark-4) which can be connected to a PC to send commands to the Controller in order to let the robots do things.
The PC to Controller connection is a serial RS-232 connection.
- fabio's blog
- 19 comments
- Read more
- 14326 reads
Sudoku resolver in Python
A simple Sudoku resolver written in Python.
Sorry for the Italian code comments. Please add a comment below if you don't get parts of the algorithm.
- fabio's blog
- 3 comments
- Read more
- 4997 reads





Recent comments
29 sec ago
3 hours 15 min ago
3 days 18 hours ago
4 days 11 hours ago
4 days 20 hours ago
5 days 16 hours ago
5 days 20 hours ago
5 days 21 hours ago
5 days 21 hours ago
5 days 22 hours ago