Re: [Tutor] File transfer HTTP -> SFTP

2011-03-01 Thread Modulok
This isn't a python solution, but if you have an ssh connection to both servers, (I assume so) you can forward them directly. It would look like this in an operating system shell like tcsh or bash: me@baz> scp -r m...@foo.com:/home/me/pictures m...@bar.com:/somewhere/ You could wrap the above com

[Tutor] File transfer HTTP -> SFTP

2011-03-01 Thread Emanuel Lauria
Sorry if im annoying, but I think this is a better question than my previous one of today. I have some Images in an HTTP Server that I need to transfer to an SFTP server using a Python script. So far I can download them to my hard drive, and upload them to the sftp server; quite easy. I would

Re: [Tutor] File transfer

2010-10-31 Thread Steven D'Aprano
Chris King quoted Corey Richardson: On 10/31/2010 12:03 PM, Corey Richardson wrote: [...] To read from a file, you open it, and then read() it into a string like this: for line in file: string += string + file.readline() Aii! Worst way to read from a file *EVAR*!!! Seriously. Don'

Re: [Tutor] File transfer

2010-10-31 Thread Corey Richardson
On 10/31/2010 12:06 PM, Chris King wrote: On 10/31/2010 12:03 PM, Corey Richardson wrote: On 10/31/2010 11:51 AM, Chris King wrote: On 10/30/2010 10:08 PM, Corey Richardson wrote: If you can send a list, have the list [name, data] where name is the file name and data is the raw binary of t

Re: [Tutor] File transfer

2010-10-31 Thread Chris King
On 10/31/2010 12:03 PM, Corey Richardson wrote: On 10/31/2010 11:51 AM, Chris King wrote: On 10/30/2010 10:08 PM, Corey Richardson wrote: If you can send a list, have the list [name, data] where name is the file name and data is the raw binary of the file, contained in a string. On 10/30/2

Re: [Tutor] File transfer

2010-10-31 Thread Steven D'Aprano
Corey Richardson wrote: If you can send a list, have the list [name, data] where name is the file name and data is the raw binary of the file, contained in a string. How do you send a list? -- Steven ___ Tutor maillist - Tutor@python.org To unsub

Re: [Tutor] File transfer

2010-10-31 Thread Alan Gauld
"Chris King" wrote How would I send a file from one computer to another. I have modules which can send simple objects, such as dictionaries with simple objects in it. They can't send files thou. Please help. Can you use ftp? Thats the easiest way... Python has an ftp module. The only

Re: [Tutor] File transfer

2010-10-30 Thread Corey Richardson
If you can send a list, have the list [name, data] where name is the file name and data is the raw binary of the file, contained in a string. On 10/30/2010 9:11 PM, Chris King wrote: Dear Tutors, How would I send a file from one computer to another. I have modules which can send simple ob

[Tutor] File transfer

2010-10-30 Thread Chris King
Dear Tutors, How would I send a file from one computer to another. I have modules which can send simple objects, such as dictionaries with simple objects in it. They can't send files thou. Please help. Sincerely, Me import SocketServer, cPickle def echo(self): #the default handling f

Re: [Tutor] file transfer through serial modem -- pythin code

2008-02-26 Thread Chris Fuller
You probably want to start with PySerial: http://pyserial.sourceforge.net/ But, the details really depend on the application.. what are you talking to at the other end? Do you need a general terminal program? You can probably find xmodem and zmodem libraries, but if you control both ends, roll

[Tutor] file transfer through serial modem -- pythin code

2008-02-26 Thread Govind
Hi All, I am new to python. I want to transfer files over serial modem.so can I have some sample python code or any helpful links so that I can implement it. All help will be highly appreciated. Thanks & Regards, Govind Goyal Adya Systems & Software Pvt. Ltd. 212, IInd Floor, Okhla Industrial E

Re: [Tutor] File transfer

2005-07-18 Thread Andreas Kostyrka
Am Montag, den 18.07.2005, 11:39 +0200 schrieb Raj Moodley: > Hi All, am a newbie to python and need some help. > > > > I need to transfer a file from a “client” over a normal telephone call > (no ISP) or an internet connection (thro ISP) to a central “server”. Well, even without ISP you can h

Re: [Tutor] File transfer

2005-07-18 Thread Alan G
> I need to transfer a file from a "client" over a normal telephone > call (no You still need some kind of protocol between the two computers. Common protocol for file transfers include xmodem and zmodem and ISTR seeing modules for each of them on the vaults of parnassus. You could do it at the

[Tutor] File transfer

2005-07-18 Thread Raj Moodley
Hi All, am a newbie to python and need some help.   I need to transfer a file from a “client” over a normal telephone call (no ISP) or an internet connection (thro ISP) to a central “server”. The “server” needs to open this file process it and then output a file which then needs to be s