Paul Rubin wrote:
> Johannes Graumann writes:
>> '00:08:9b:ce:f5:d4'
>> ...
>> hexcall = "\\x".join(hexcall).decode('string_escape')
>
> I think it's best not to mess with stuff like that. Convert to integers
> then convert back:
MRAB wrote:
> On 2012-10-07 20:44, Johannes Graumann wrote:
>> Dear all,
>>
>> I'm trying to convert
>> '00:08:9b:ce:f5:d4'
>> to
>> '\x00\x08\x9b\xce\xf5\xd4'
>> for use in magic packet construction for WakeOnLan l
Dear all,
I'm trying to convert
'00:08:9b:ce:f5:d4'
to
'\x00\x08\x9b\xce\xf5\xd4'
for use in magic packet construction for WakeOnLan like so:
wolsocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
wolsocket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1
When interactively asking for a path on the cmdl, I'd like to go beyond just
'raw_input' and provide shell like path completion. My research has made me
believe that a combination of the cmd and glob modules is what I need, but
I find the doc HIGHLY unintuitive and wasn't able to come by any exampl