Last active
May 18, 2016 20:44
-
-
Save sestaton/c533df89ace9d026871209180202b554 to your computer and use it in GitHub Desktop.
get ncbi ftp listing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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