Changeset 35930 in vbox
- Timestamp:
- Feb 10, 2011 2:32:59 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/doc/manual/en_US/SDKRef.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/SDKRef.xml
r35929 r35930 1448 1448 mgr.closeMachineSession(session) 1449 1449 </screen> 1450 1451 <para>This code also shows cross-platform access to array properties 1450 <para> 1451 Following code will print all registered machines and their log folders 1452 </para> 1453 <screen>from vboxapi import VirtualBoxManager 1454 mgr = VirtualBoxManager(None, None) 1455 vbox = mgr.vbox 1456 1457 for m in mgr.getArray(vbox, 'machines'): 1458 print "Machine '%s' logs in '%s'" %(m.name, m.logFolder) 1459 </screen> 1460 1461 <para>Code above demonstartes cross-platform access to array properties 1452 1462 (certain limitations prevent one from using 1453 1463 <computeroutput>vbox.machines</computeroutput> to access a list of 1454 1464 available virtual machines in case of XPCOM), and a mechanism of 1455 uniform session creation 1456 (<computeroutput> virtualBoxManager.mgr.getSessionObject()</computeroutput>).</para>1465 uniform session creation and closing 1466 (<computeroutput>mgr.mgr.getSessionObject()</computeroutput>).</para> 1457 1467 1458 1468 <para>In case you want to use the glue layer with a different Python
Note:
See TracChangeset
for help on using the changeset viewer.

