Help implementing an idea

Tim Roberts timr at probo.com
Sun Jun 19 02:36:08 EDT 2005


Nicholas.Vaidyanathan at asu.edu wrote:
>
>Well, I'm a total python n00b, but I was playing around with exception handling 
>yesterday, and was stricken by how incredibly easy it is to use the op system 
>to create nice scripts... I did the following:
>
>import sys
>lines = sys.stdin.readlines()
>lines.sort()
>for stuff in lines:
>    print stuff , 

Or sys.stdout.writelines( lines ).

>just to copy stuff from one file to another, and was quite impressed with the 
>results. Now, I was thinking today, I'd really like to create a program that 
>can go to a specific directory and upload all the files in the directory to a 
>specific url for backup purposes, and I have the feeling that the python 
>implementation would be ruthlessly small and efficient, like the 
>above....anyone who could point me in the right direction as to how to actually 
>do it?

How do you want to do the upload?  FTP?  That's easy.  Check ftplib.py.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list