VirtualBox

儲存庫 vbox 的更動 35930


忽略:
時間撮記:
2011-2-10 下午02:32:59 (14 年 以前)
作者:
vboxsync
訊息:

SDK docs: array property demo

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • 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
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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