April 18th, 2004, 07:25 AM
What is argv for, I saw it alot on Python's program
Let say if i want to retrieve an HTML file from server, I need to use retrlines commant then write to file, right??
How to upload a file to FTP server??
How to retrive or send binary file to a server??
April 18th, 2004, 11:35 AM
Originally Posted by flixxer
It is a list which contains the command line parameters passed to the program. If you start your script with
c:\> python myprog.py -v something blah
Then sys.argv will be;
['myprog.py', '-v', 'something', 'blah']
As to the FTP questions, I haven't used it myself, but for the binary files look at ftp.storbinary and ftp.retrbinary in the ftplib module - http://docs.python.org/lib/module-ftplib.html