Skip to content

Instantly share code, notes, and snippets.

@sestaton
Last active May 18, 2016 20:44
Show Gist options
  • Save sestaton/c533df89ace9d026871209180202b554 to your computer and use it in GitHub Desktop.
Save sestaton/c533df89ace9d026871209180202b554 to your computer and use it in GitHub Desktop.
get ncbi ftp listing
from ftplib import FTP
host = "ftp.ncbi.nlm.nih.gov"
wdir = "/genomes/refseq/"
ftp = FTP(host, 'anonymous', 'anonymous')
ftp.set_pasv(1)
list = ftp.nlst(wdir)
print len(list)
ftp.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment