fypp.py 文件源码

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

项目:fypp 作者: aradi 项目源码 文件源码
def parsefile(self, fobj):
        '''Parses file or a file like object.

        Args:
            fobj (str or file): Name of a file or a file like object.
        '''
        if isinstance(fobj, str):
            if fobj == STDIN:
                self._includefile(None, sys.stdin, STDIN, os.getcwd())
            else:
                inpfp = _open_input_file(fobj)
                self._includefile(None, inpfp, fobj, os.path.dirname(fobj))
                inpfp.close()
        else:
            self._includefile(None, fobj, FILEOBJ, os.getcwd())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号