⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checked_system.py

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 PY
字号:
import osimport stringimport sysdef system( commands ):    if sys.platform == 'win32':        f = open( 'tmp.cmd', 'w' )        f.write( string.join( commands, '\n' ) )        f.close()        rc = os.system( 'tmp.cmd' )        return rc    else:        rc = os.system( '&&'.join( commands ) )        return rc    def checked_system( commands, valid_return_codes = [ 0 ] ):    rc = system( commands )     if rc not in [ 0 ] + valid_return_codes:        raise Exception( 'Command sequence "%s" failed with return code %d' % ( commands, rc ) )    return rc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -