Hi
I am sending a text file to a remote app using urllib2. It all works well, but it just seems to take a very long time to send the data.
My code is basically doing :
TxData = open('OutputFile.txt')
data = {'name': 'value',
'file': TxData
}
f = urllib2.urlopen(url, data)
s = f.read(2) # Read only 2 bytes of data as the remote app only sends
# an OK if the file is sent successfully
f.close()
TxData.close()
As I said, it works fine as most of the files are less than 5kb but if I try to send a
file of, say, 100k it can take 10 minutes which seems ridiculous especially as the remote machine is sitting on our own LAN (i.e. it is not sending across the internet)
Any ideas why the data is taking so long to send, or clues as to how I can find out hat is happening?
Thanks