快速开始¶
安装¶
要使用 pymemuc,首先使用 pip 安装它:
$ pip install pymemuc
用法示例¶
# import the PyMemuc class
from pymemuc import PyMemuc
# create a PyMemuc instance, doing so will automatically link to the MEMUC executable
memuc = PyMemuc()
# create a new vm, saving the index
index = memuc.create_vm()
# start the vm
memuc.start_vm(index)
# stop the vm
memuc.stop_vm(index)
# delete the vm
memuc.delete_vm(index)