write to remote ile

monkeys paw monkey at joemoney.net
Sun Mar 7 21:10:00 EST 2010


I can xfer a file from a remote server using:

import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')

for line in x:
     print line


How can i write a file to the remote server?

I tried:

x = u.url.open('http://joemoney.net/somefile.txt', 'w')

but that does not work



More information about the Python-list mailing list