On 2005-11-23, David M <[EMAIL PROTECTED]> wrote: > OK so here is my task. I want to get at the data stored in > /var/account/pacct, which stores process accounting data, so that I can > make it into a more human understandable format then what the program > sa can do. The thing is, its in a binary format and an example program > that reads some data from the file is done in C using a struct defined > in sys/acct.h. > > http://www.linuxjournal.com/articles/lj/0104/6144/6144l2.html > > So I was wondering how can I do the same thing, but in python? I'm > still learning so please be gentle.
use the struct module http://www.python.org/doc/current/lib/module-struct.html -- Grant Edwards grante Yow! O.K.! Speak with a at PHILADELPHIA ACCENT!! Send visi.com out for CHINESE FOOD!! Hop a JET! -- http://mail.python.org/mailman/listinfo/python-list