编辑器
import tabnanny import tempfile with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f: f.write('def hello():\n print("Hello")\n') fname = f.name tabnanny.check(fname) print('Indentation check completed')
Indentation check completed