def test(): sudoPassword = ‘test‘ command = ‘/opt/lampp/lampp stopmysql‘ str = os.system(‘echo %s|sudo -S %s‘ % (sudoPassword, command)) print str
原文地址:https://www.cnblogs.com/xiyuan2016/p/10143963.html
时间: 2024-12-22 11:01:03
def test(): sudoPassword = ‘test‘ command = ‘/opt/lampp/lampp stopmysql‘ str = os.system(‘echo %s|sudo -S %s‘ % (sudoPassword, command)) print str
原文地址:https://www.cnblogs.com/xiyuan2016/p/10143963.html