A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2010-March/721024.html below:

write to remote ile

write to remote ile write to remote ileMartin P. Hellwig martin.hellwig at dcuktec.org
Sun Mar 7 21:53:46 EST 2010
On 03/08/10 02:51, monkeys paw wrote:
> On 3/7/2010 9:20 PM, Martin P. Hellwig wrote:
>> On 03/08/10 02:10, monkeys paw wrote:
>>> 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
>>
>> How do you normally (i.e. without python) put files on a remote server?
>>
> Using FTP, i'm really having a brain cramp here, but i'm new to python

We all been there, in some for or other ;-), anyway you might want to 
have a look at this:
http://docs.python.org/library/ftplib.html

-- 
mph

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4