stdio.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:MIT-CS-lectures 作者: William-Python-King 项目源码 文件源码
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]())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号