> That telnet localhost gpsd command simply makes a socket connection
> and prints what it receives, you don't need getpass, telnetlib or gzip
> python modules.  If I'm right you could even just pipe the socket into
> your program using bash
>
> ./python-program < /dev/tcp/localhost/2947
>

Yes I was looking into socket programming.This code does not output the gps
data :

import sys
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('127.0.0.1', 2947))
while True:
    line = s.recv(1024)
    sys.stdout.write(line)
    sys.stdout.flush()

Any suggestion as to why it dint work?It compiles fine.

Sriranjan
_______________________________________________
devel mailing list
devel@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/devel

Reply via email to