Hi All
I hope everyone is well.
I am trying to create a small script to connect to FTP using python I am new to python and I was hoping to get help.
Basically the script needs to ask for the server address, username and password.
The below code works but I wanted to ask each time for the details.
Thank you in advanced
I hope everyone is well.
I am trying to create a small script to connect to FTP using python I am new to python and I was hoping to get help.
Basically the script needs to ask for the server address, username and password.
Code:
from ftplib import FTP
server= raw_input('Enter Server Address:')
user= raw_input ('Enter Username:')
word= raw_input ('Enter Password:')
ftp.login()
ftp.retrlines('LIST')
The below code works but I wanted to ask each time for the details.
Code:
from ftplib import FTP
ftp=FTP('server')
ftp.login('user','password')
ftp.retrlines ('LIST')
Thank you in advanced