app = Flask(__name__)
@app.route("/")
def hello():
address="someserver"
global FTP
ftp = FTP(address)
ftp.login()
return ftp.retrlines("LIST")
if __name__ == "__main__":
app.run()
...这给了我以下输出:
226-Options: -l 226 1 matches total
问题是 - 为什么这不打印 retrlines 的输出,我该怎么做?