python

Python: call a function with more arguments on each element of a list

Submitted by fabio on Wed, 2008-06-25 12:13.

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]

Serial RS232 connections in Python

Submitted by fabio on Thu, 2008-05-08 14:18.

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.

Sudoku resolver in Python

Submitted by fabio on Sat, 2007-12-08 15:15.

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.