Zusammenfassung der Ressource
Frage 1
Frage 2
Frage
Which method of the ftp class of the ftplib module uses ASCII mode to transfer files?
Antworten
-
retrtxt()
-
retrbinary()
-
retrascii()
-
retrlines()
Frage 3
Frage
When can you use urllib instead of ftplib to read and transfer files from an FTP server?
Antworten
-
anonymous FTP servers with a web interface
-
password protected FTP servers without a web interface
-
password protected FTP servers with a web interface
-
anonymous FTP servers without a web interface
Frage 4
Frage
How do you set the current directory using ftplib on an FTP server so you can navigate to the files you need?
Antworten
-
ftp.cwd(pathname)
-
ftp.path(pathname)
-
ftp.dir(pathname)
-
ftp.setdir(pathname)
Frage 5
Frage
When working with a ZIP file in Python using the zipfile module, how do you determine which files are present in the ZIP file without extracting them?
Antworten
-
open the file using something like zipfile.ZipFile("example.zip", "r"), then use the namelist method
-
open the file using something like zipfile.ZipFile("example.zip", "r"), then use the ziplist method
-
open the file using something like zipfile.ZipFile("example.zip", "r"), then use the read method
-
create a list of the files using something like zipfile.ListFiles("example.zip")
Frage 6
Frage
Which compression method is the default employed by the zipfile module in Python?
Antworten
-
ZIP_STORED
-
TAR
-
GZIP
-
ZIP_COMPRESSED
-
ZIP_DEFLATED
Frage 7
Frage
How would you extract all files in a ZIP file to the current working directory using the zipfile module in Python?
Antworten
-
ZipFile.openall()
-
ZipFile.extractall()
-
ZipFile.unzip()
-
ZipFile.extract("*")
Frage 8
Frage
You should never use XML to store geospatial data since it is text-based and will therefore render your geospatial data useless.
Frage 9
Frage
Which of the following module or libraries are used to work with XML data in Python? (check all that apply)
Antworten
-
xml.sax
-
xmlopen
-
xmlparser
-
xml.dom
-
xmllib
-
xml.etree.ElementTree
Frage 10
Frage
XML files are notorious for missing or incorrect tags. Which module/library would you use in Python to parse XML files that contain tag errors?
Antworten
-
ElementTree
-
AlphabetSoup
-
BeautifulSoup
-
XMLfix
-
parseXML