def _main():
"""
For testing. The command-line argument should be the name of the
function that should be called.
"""
map = {
'readInt': readInt, 'readAllInts': readAllInts,
'readFloat': readFloat, 'readAllFloats': readAllFloats,
'readBool': readBool, 'readAllBools': readAllBools,
'readString': readString, 'readAllStrings': readAllStrings,
'readLine': readLine, 'readAllLines' : readAllLines,
'readAll': readAll }
testId = sys.argv[1]
if testId == 'write':
_testWrite()
else:
writeln(map[testId]())
评论列表
文章目录