import os
import time
class Dnconsole_leidian(object):
'雷电模拟器启动与关闭'
def __init__(self):
self.console = r'D:\..\..\leidian\LDPlayer4\ldconsole.exe '
def launch(self, index: int):
'开启'
cmd = self.console + 'launch --index ' + str(index)
process = os.popen(cmd)
result = process.read()
print(result)
process.close()
def quit(self, index: int):
'关闭'
cmd = self.console + 'quit --index ' + str(index)
process = os.popen(cmd)
result = process.read()
process.close()
return result
class Dnconsole_mumu(object):
'雷电模拟器启动与关闭'
def __init__(self):
self.console = r'D:\..\..\emulator\nemu9\EmulatorShell\NemuPlayer.exe '
def quit_mumu(self):
'关闭'
os.system("wmic process where name='NemuPlayer.exe' delete")
def launch_mumu(self):
'启动'
cmd = self.console + 'launch'
os.popen(cmd)
def run(self):
self.quit_mumu()
print('关闭MUMU模拟器成功')
time.sleep(5)
self.launch_mumu()
print('打开MUMU模拟器成功')
Dnconsole_mumu().run()
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60