what kind of work do you do

Will Ware wware at world.std.com
Tue Aug 22 08:02:39 EDT 2000


On Sun, 20 Aug 2000 00:58:51 GMT, sp00fD <sp00fD at yahoo.com> wrote:
>I was just wondering, of the people here that use Python at work, what
>kind of programming are you doing and what company?

My company writes controller software for laser printers, copiers, faxes,
and scanners (and gadgets called MFPs with more than one function in the
same box). A couple of years ago I was working on a copier project and
used Python to maintain 1-d lookup tables that mapped gray levels from
input to output. Framing them as objects made it easy to add new functions
as they became necessary. For instance, there were several useful
representations: C code, input to gnuplot, PJL (a printer language that
allowed me to download new tables to a copier/printer at run-time), email
from the customer. It was handy to be able to invert tables, concatenate
them, interpolate a table from a few (x,y) points, smooth a table that
was noisy, etc.

Lately I'm porting our code to a new DSP chip, which has its own set of
tools loosely based on the GNU chain. One of our source files is a very
large block of data, which typically gets copied into a C file, compiled
and linked. An early version of the compiler was unable to accept a C
file that large (a more recent version has fixed this bug). I wanted to
generate an ELF object file directly from the raw data. Being unfamiliar
with the ELF format, I needed to write an analyzer that takes apart ELF
files and shows the value for every struct slot. I wrote the analyzer in
Python and it was much easier to write and maintain than if it were in C.

There are lots of unmemorable little throw-away scripts over the past
several years, the kinds of things I imagine a lot of people would do
in Perl.

OK, I remember another. We keep our source code in a central database.
When I want to tinker with it, I copy it to a directory tree on my own
machine. Then I create a zero-length timestamp reference file.  Any file
newer than the reference file is one that I have tinkered with. I have a
set of scripts for comparing timestamps to identify the local changes,
tarball them, show them as diffs, and even one that un-localizes a file:
asks if you're sure you want to do it, then copies the original out from
the database, and sets the timestamp to make it older than the timestamp
reference file.
-- 
# - - - - - - - - - - - - - - - - - - - - - - - -
# Resistance is futile. Capacitance is efficacious.
# Will Ware	email:    wware @ world.std.com



More information about the Python-list mailing list