[Tutor] First python-script: a little network client
Thu, 3 Feb 2000 21:30:01 +0100
I m trying to do the first thing in python. I would like to query the
OANDA currency server for some exchange rates. I wanted to do a
simple script, modify it in some methods and form a class for
starters, as I am also beginning with OOP.
But I can't get it to work at all!
The protocoll specs for fxp is at
<http://www.oanda.com/site/fxp/protocol.html>, case someone's
The following script does not produce _anything_ in data :-( Is my
simple client so wrong or is there anything with Oanda I am not aware
Where can I learn about doing easy network/socks clients?
# Currency Fetcher - fetch a conversion unit from OANDA
from socket import *
HOST = 'www.oanda.com'
PORT = 5011
sock = socket(AF_INET, SOCK_STREAM)
data = sock.recv(1024)
if not data: break