All,
thank you for your responses. I learned much and made some modifications in my
small program. Currently I am attempting to put together a packet that contains
a Python message (created using struct.pack) and a Scapy message (Ether()).
Having a packet with combined payload from Python and S
Steven D'Aprano a écrit :
> On Mon, 12 Mar 2007 21:39:11 -0700, jezonthenet wrote:
>
>> I started using Python a couple of days ago - here are a few
>> questions:
>>
>> * Doesn't the __main__() method automatically execute when I run my
>> python program?
>
>
> No.
>
>
>> * Only when I do an
[EMAIL PROTECTED] a écrit :
> I started using Python a couple of days ago - here are a few
> questions:
>
> * Doesn't the __main__() method automatically execute when I run my
> python program?
Which "__main__" method ???
Anyway, the answer is no. Every code at the top-level (which includes
imp
En Tue, 13 Mar 2007 03:13:37 -0300, je . <[EMAIL PROTECTED]>
escribió:
> I added the self parameter to the the chassis_id function, however I now
> have a problem and question regarding encoding MAC addresses for a
> struct. What string format am I supposed to use?
py> data = [int(x,16)
You only need three things here:
[EMAIL PROTECTED] wrote:
>
>#!/usr/bin/python
>import scapy
>import struct
>
>class lldp_class:
> def __init__(self):
> self.chassis_id_tlv = None
>
> def chassis_id(subtype, chassis_info):
Make that
def chassis_id(self, subtype,
Jordan, Thinker, Steven,
Thanks for your responses. Makes more sense now! I can run my program from the
console.
I added the self parameter to the the chassis_id function, however I now have a
problem and question regarding encoding MAC addresses for a struct. What string
format am I sup
[EMAIL PROTECTED], "Greenberg <"@bag.python.org,
"greenbergj\""@NOSPAM.xs4all.nl, [EMAIL PROTECTED], ">"@bag.python.org writes:
> [EMAIL PROTECTED] wrote:
> > * Doesn't the __main__() method automatically execute when I run
> > my python program?
>
> No, there is no special __main__ function, to
On Mon, 12 Mar 2007 21:39:11 -0700, jezonthenet wrote:
> I started using Python a couple of days ago - here are a few
> questions:
>
> * Doesn't the __main__() method automatically execute when I run my
> python program?
No.
> * Only when I do an import of my test.py file within python and t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
[EMAIL PROTECTED] wrote:
> I started using Python a couple of days ago - here are a few
> questions:
>
> * Doesn't the __main__() method automatically execute when I run my
> python program?
> * Only when I do an import of my test.py file within python
[EMAIL PROTECTED] wrote:
> I started using Python a couple of days ago - here are a few
> questions:
>
> * Doesn't the __main__() method automatically execute when I run my
> python program?
> * Only when I do an import of my test.py file within python and then
> run test.__main__() I can see wher
I started using Python a couple of days ago - here are a few
questions:
* Doesn't the __main__() method automatically execute when I run my
python program?
* Only when I do an import of my test.py file within python and then
run test.__main__() I can see where my bugs are. Is this correct?
(right
11 matches
Mail list logo