Re: ftp and python

2010-04-11 Thread Giampaolo Rodola'
On 8 Apr, 07:24, John Nagle na...@animats.com wrote: Tim Chase wrote: Matjaz Pfefferer wrote: What would be the easiest way to copy files from one ftp folder to another without downloading them to local system? As best I can tell, this isn't well-supported by FTP[1] which doesn't seem

Re: ftp and python

2010-04-08 Thread Simon
You could user FTP.voidcmd() E.G. ftp.voidcmd('RNFT filename.txt')ftp.voidcmd('RNTO newdir/filename.txt') From the rfc: RENAME FROM (RNFR) This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a rename to command

Re: ftp and python

2010-04-08 Thread Tim Chase
Simon wrote: You could user FTP.voidcmd() E.G. ftp.voidcmd('RNFT filename.txt')ftp.voidcmd('RNTO newdir/filename.txt') From the rfc: RENAME FROM (RNFR) This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a rename

Re: ftp and python

2010-04-08 Thread Anssi Saari
John Nagle na...@animats.com writes: In theory, the FTP spec supports three-way transfers, where the source, destination, and control can all be on different machines. But no modern implementation supports that. I remember even using that way back when, Unix machines in the 1990s. But,

Re: ftp and python

2010-04-08 Thread John Nagle
Anssi Saari wrote: John Nagle na...@animats.com writes: In theory, the FTP spec supports three-way transfers, where the source, destination, and control can all be on different machines. But no modern implementation supports that. I remember even using that way back when, Unix machines

ftp and python

2010-04-07 Thread Matjaz Pfefferer
Hi, I'm Py newbie and I have some beginners problems with ftp handling. What would be the easiest way to copy files from one ftp folder to another without downloading them to local system? Are there any snippets for this task (I couldnt find example like this) Thx

Re: ftp and python

2010-04-07 Thread Tim Chase
Matjaz Pfefferer wrote: What would be the easiest way to copy files from one ftp folder to another without downloading them to local system? As best I can tell, this isn't well-supported by FTP[1] which doesn't seem to have a native copy this file from server-location to server-location

Re: ftp and python

2010-04-07 Thread John Nagle
Tim Chase wrote: Matjaz Pfefferer wrote: What would be the easiest way to copy files from one ftp folder to another without downloading them to local system? As best I can tell, this isn't well-supported by FTP[1] which doesn't seem to have a native copy this file from server-location to

Re: having problems in changing directories doing ftp in python

2007-07-09 Thread Gabriel Genellina
En Sat, 07 Jul 2007 09:41:59 -0300, [EMAIL PROTECTED] [EMAIL PROTECTED] escribió: I'm trying to write a ftp in python to send files to my webserverr. Curtly I will change the directory to the folder name, down load the file, then do a chnag dir ..\ to go back to the root diretory, chnag

Re: having problems in changing directories doing ftp in python

2007-07-09 Thread [EMAIL PROTECTED]
Hi, Thank you for your cfomment, also I forgot about the case issue, yes my web server is unix, not windows On Jul 9, 4:12 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 07 Jul 2007 09:41:59 -0300, [EMAIL PROTECTED] [EMAIL PROTECTED] escribió: I'm trying to write aftpin python

Re: having problems in changing directories doing ftp in python

2007-07-09 Thread dabu11et
On Jul 9, 4:37 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Thank you for your cfomment, also I forgot about the case issue, yes my web server is unix, not windows On Jul 9, 4:12 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 07 Jul 2007 09:41:59 -0300, [EMAIL PROTECTED]

having problems in changing directories doing ftp in python

2007-07-07 Thread [EMAIL PROTECTED]
Hi, I'm trying to write a ftp in python to send files to my webserverr. Curtly I will change the directory to the folder name, down load the file, then do a chnag dir ..\ to go back to the root diretory, chnag the directory, save the file, do a ../. Instad of going back one directory by doing

Regexp not performing the same in FTP versus Python

2007-02-08 Thread IamIan
Hello all, I'm trying to use a regular expression in an FTP script to list certain files. When run in a standard FTP session the command: dir .??[oOdDnNmM]* returns 48 files. When I use the following Python script it prints roughly 12 files (a subset of the 48), ending with 'None':

Re: Regexp not performing the same in FTP versus Python

2007-02-08 Thread IamIan
It's strange but since more files have been added to this directory the regexp appears to be working correctly. Sorry to bother the list and thanks for your time. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Regexp not performing the same in FTP versus Python

2007-02-08 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], IamIan wrote: Hello all, I'm trying to use a regular expression in an FTP script to list certain files. When run in a standard FTP session the command: dir .??[oOdDnNmM]* returns 48 files. When I use the following Python script it prints roughly 12 files

Re: retrieve data using FTP in Python

2005-09-14 Thread Fredrik Lundh
in Python ? And also, Can you suggest me some books and online references to get familiar with Python and especially FTP modules in Python ? for python, start here: http://wiki.python.org/moin/BeginnersGuide for ftplib, see e.g. http://www.python.org/doc/2.4/lib/module-ftplib.html

retrieve data using FTP in Python

2005-09-14 Thread swarna pulavarty
Hi all, I am new to this Python group and to Python . I need to retrieve data from an arbitrary URL and save it to a file. Can anyone tell me how to retrieve "any" data using FTP modules in Python ? And also, Can you suggest me some books and online references to get familiar w

Re: retrieve data using FTP in Python

2005-09-14 Thread Jaime Wyant
pulavarty [EMAIL PROTECTED] wrote: Hi all, I am new to this Python group and to Python . I need to retrieve data from an arbitrary URL and save it to a file. Can anyone tell me how to retrieve any data using FTP modules in Python ? And also, Can you suggest me some books and online

retrieve data using FTP in Python

2005-09-13 Thread swarna pulavarty
Hi all, I am new to this Python group and to Python . I need to retrieve data from an arbitrary URL and save it to a file. Can anyone tell me how to retrieve "any" data using FTP modules in Python ? And also, Can you suggest me some books and online references to get familiar w

Re: retrieve data using FTP in Python

2005-09-13 Thread Steve Holden
swarna pulavarty wrote: Hi all, I am new to this Python group and to Python . I need to retrieve data from an arbitrary URL and save it to a file. Can anyone tell me how to retrieve any data using FTP modules in Python ? And also, Can you suggest me some books and online references