Hi,
I want to have tab completion in my program for interactive input.
Using readline and rlcompleter this works nicely. But I also have to
catch and modify all "print" output, so I redirect sys.stdout
to a custom file-like object. The problem is: After the redirection,
readline support seems sudd
scripteaze wrote:
> I need to be able to send a rip1 request to my rip1 enabled device.,
> so i need python to send :
> 01 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 10
Use Scapy:
from scapy import *
myrip = RIP()/RIPEntry(metric=16)
ans, unans = sr(IP(dst="192.168.1.1")/
Bjoern Schliessmann wrote:
> readline module applies its autocompletion functions to (and only
> to) sys.stdout.
I see. Then I guess I'll have to avoid redirecting sys.stdout and
come up with some kind of workaround instead.
Nevertheless, thanks for the info.
Regards
Dirk
--
http://mail.python.o
scripteaze wrote:
>>> I need to be able to send a rip1 request to my rip1 enabled device.,
> Well, i use scapy quite often, however, this needs to be very portable
import socket
rip_request = '\x01\x01\x00\x00\x00\x02' + '\x00' * 17 + '\x10'
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s