Little direction please Python MySQL

len lsumnler at gmail.com
Thu Nov 13 15:25:50 EST 2008


Hi all;

I am looking for a little direction in moving from novice python MySQL
to real world processing.

I can connect to MySQL databases and have performed most of the
various select, create, update, insert, etc given the examples in the
various books and internet tutorials not to many problems.

Here is my problem.  I need to start doing this in the really world at
my company converting some older cobol system and data to python
programs and MySQL.  I have gotten past packed decimal fields and
various other little tidbits.  My problem is the data files aren't
little three of four field files but Customer File with 98 fields
etc.  I understand building dictionaries and building with zip and I
have even seen a reference to using __setattr__ in an empty class but
I'm having a hard time moving past the little code snippts to real
code.

As you can image the data coming from old cobol files fieldname are
generally very large and tons of code that might start looking like;

     order['ordhdr_sales_amount'] += order['ordlin_sales_qty'] * order
['ordlin_sales_price']

could start becoming quite cumbersum.

I'm sure that there is someway to make all of this less verbose using
classes and such but I need some direction.

Could someone recommend either books, website, or free package whose
code I could look at to move from the student type programs to gee I
work in the real world now programs.

Thanks Len



More information about the Python-list mailing list