PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import ftplib
""" Shows a repository of old games from idSoftware """
# Time Limit Exceeded...just try again in a minute
# ~ 2.3M files
ftp=ftplib.FTP('ftp.mirror.nl')
# welcome message - pertinent access info
out = ftp.getwelcome() + "\n"
# login anonymously
out += ftp.login() + "\n"
# change working directory
out += ftp.cwd('/pub') + "\n"
# retrieve directory listing
print(out, "\n** Directory of /pub **")
ftp.retrlines('LIST')
# look deeper
ftp.cwd('/pub/Museum/idsoftware/idstuff')
# Workaround SoloLearn triple-slash display glitch
print("\n** Directory of |pub|Museum|idsoftware|idstuff **")
ftp.retrlines('LIST')
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run