VirtualBox

Changeset 35930 in vbox


Ignore:
Timestamp:
Feb 10, 2011 2:32:59 PM (14 years ago)
Author:
vboxsync
Message:

SDK docs: array property demo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/SDKRef.xml

    r35929 r35930  
    14481448mgr.closeMachineSession(session)
    14491449        </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
     1454mgr = VirtualBoxManager(None, None)
     1455vbox = mgr.vbox
     1456
     1457for m in mgr.getArray(vbox, 'machines'):
     1458print "Machine '%s' logs in '%s'" %(m.name, m.logFolder)
     1459        </screen>
     1460
     1461        <para>Code above demonstartes cross-platform access to array properties
    14521462        (certain limitations prevent one from using
    14531463        <computeroutput>vbox.machines</computeroutput> to access a list of
    14541464        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>
    14571467
    14581468        <para>In case you want to use the glue layer with a different Python
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette