At Monday 4/12/2006 13:39, [EMAIL PROTECTED] wrote:
class Factory:
def __isValidEventClass(self, obj):
if inspect.isclass(obj) and obj != events.EvtBase and \
events.EvtBase in inspect.getmro(obj):
for m in inspect.getmembers(obj):
if m[0] == 'eventNum':
ret
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dennis Lee Bieber:
>> Presuming the is a type code I'd just set up a list of
>> functions:
>> Then create a dictionary of them, keyed by the code
>> processors = { "1" : process_1,
>> "2" : process_2,
>>
>> "x" : process
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dennis Lee Bieber:
>> Presuming the is a type code I'd just set up a list of
>> functions:
>> Then create a dictionary of them, keyed by the code
>> processors = { "1" : process_1,
>> "2" : process_2,
>>
>> "x" : proces
Dennis Lee Bieber:
> Presuming the is a type code I'd just set up a list of functions:
> Then create a dictionary of them, keyed by the code
> processors = { "1" : process_1,
> "2" : process_2,
>
> "x" : process_x }
Jus
Romulo A. Ceccon wrote:
> George Sakkis wrote:
>
> > If you actually intend to
> > 1) name your Event subclasses Evt1, Evt2, ... EvtN and not give more
> > descriptive (but unrelated to the magic event number) names
>
> No, those names are just an example. The actual classes have
> descriptive name
George Sakkis wrote:
> If you actually intend to
> 1) name your Event subclasses Evt1, Evt2, ... EvtN and not give more
> descriptive (but unrelated to the magic event number) names
No, those names are just an example. The actual classes have
descriptive names.
> By the way, it is not clear from
On 4 Dec 2006 08:39:17 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to parse a binary file produced by an embedded system, whose
> content consists in a set of events laid-out like this:
>
> ...
>
> Every "event" is a single byte in size, and it indicates how long is
>
[EMAIL PROTECTED] wrote:
> Hi,
>
> I need to parse a binary file produced by an embedded system, whose
> content consists in a set of events laid-out like this:
>
> ...
>
> Every "event" is a single byte in size, and it indicates how long is
> the associated "data". Thus, to parse all events
Hi,
I need to parse a binary file produced by an embedded system, whose
content consists in a set of events laid-out like this:
...
Every "event" is a single byte in size, and it indicates how long is
the associated "data". Thus, to parse all events in the file, I need to
take it like a st