I'm currently making the base of a personal ftp program, using ftputil 3.4 and python 3.4, ive successfully gotten it to log in and i can run follow up commands in the python interpreter but after a single command it goes back to the main interpreter. as an example if i login, then run list, then it lists once, if i were to try it again it returns the result of typing list in pythons idle shell.
import ftputil
User = input()
Password = input()
ftp = ftputil.FTPHost('ip', User, Password)
names = ftp.listdir(ftp.curdir)
print(names)
userinput = input()
if userinput == 'list':
print(names)
#not yet implemented download function
#if userinput == 'get':
# ftp.
I'm looking for a way to keep the program from 'closing' so that i can continue running commands to and from the ftp server