Python

Jun 28, 2005 09:11

I've recently started playing with python. One day I got fed up looking for clues in the calibration logs that I get from customers when they have a problem with their LaserQC machines, so I decided it would be nice to have a program that will read the logfiles for me and plot some useful information for me. But programmer time is at a premium here at work, so I've got to write it myself.

I'm not a programmer, but I have learned how to write programs in x86 assembly, pascal(delphi) and C. I've never actually finished a whole program. In grade 11 I came close to making an html parser in delphi. It didn't display images, or connect to the web, but it made it through most of the (then current) HTML 3.2 spec.

The problem I've always had with programming is that it always took a lot of work to get a little done, I couldn't keep straight all the .c and .h files I had to create to break my code up into logical blocks, and I often forget what function calls I need to get a task done.

Python seems to work for me though. It's language is much simpler, the interactive interpreter can give hints on what methods are available for manipulating objects, breaking code into modules is easy.

For example, consider the typical "Hello World" program that nearly every student learns first in any given language.

In C it looks something like this: (if memory serves)

#include

int main(void)
{
printf("Hello World\n");
return 0;
}

In python it looks like this:

print "Hello World\n"

So much better.

So far I'm making good progress on the parser, I just need to figure out how to get that data on the screen. I'm going to use wxPython for the gui, which seems pretty straightforward.

python, work, programming

Previous post Next post
Up