Victims of Military abductions surfaced due to Writ of Amparo
Full text of the writ of Amparo can be found here

Printed copies available, email rbahaguejr [at] gmail [dot] com

Tuesday, October 18, 2005

Beginning to like Python

Problem:

Get all transaction informations from a text file dump of a POS system. Each day has a separate folder with 1 to 3 text files.

Can't picture the kind of text file to be manipulated? When you visit your favorite fastfood chain examine the receipt that is given to you by the cashier.

Doing everything in Python:

I wanted to learn Python long time ago. I just haven't got time to. Besides most of my problems are on numerical simulations. I wouldn't change my Fortran to any other language. Then, I was forced to learn PHP for web scriptings and web applications. I have done also, a couple of cli scripts on it.

With the above problem, I've found the opportunity to introduce myself to the language. Of course, with a deadline to meet, implementing a solution in a unfamiliar language might cause you your job because of the delay in the project.

I coded while learning python in 3 days (4 hours avg/day) and completing the program. I did some enhancement by the 4th day. It was not that difficult to learn the language. With the program finished all transactions can now be processed.

I have used the os and string modules. I have implemented a simple exception handling. Opening and reading each line of a file. The ouput were directly written to a another file.

:-)

No comments: