8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import os,sys,time
VERSION=0.1
def find_vm(name):
search_path=[os.environ['HOME']+"/VWs",
config.get("directories","SharedVMs"),
config.get("directories","AutostartVMs")]
for dirname in search_path:
if name in os.listdir(dirname):
return dirname+"/"+name
raise ValueError("Machine "+name+" not found.")
def connect_vm(vm_dir):
sock=socket.socket(socket.AF_UNIX)
|
>
>
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import os,sys,time
VERSION=0.1
def find_vm(name):
search_path=[os.environ['HOME']+"/VWs",
config.get("directories","SharedVMs"),
config.get("directories","AutostartVMs")]
for dirname in search_path:
if not os.access(dirname,os.X_OK):
continue
if name in os.listdir(dirname):
return dirname+"/"+name
raise ValueError("Machine "+name+" not found.")
def connect_vm(vm_dir):
sock=socket.socket(socket.AF_UNIX)
|