_get_module_from_name(name)\nFile "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_nameTestsDashboard.py", line 2, in <module>\nfr
我希望在python文件中获得前n行数据。要获得一行,我将执行next(file),而要获得更多行,则需要执行file.read(1024)或''.join(file.readlines()[:1000]。def get_first_n_rows(self, file, n=1): Will return a string of