[vbox-dev] Accessing the enums from python

Olivier Parisy ml.olivier.parisy at free.fr
Tue May 26 12:48:10 PDT 2009


Nikolay Igotti a écrit :
>    Hi Narf,
>
> Yes, it is possible, and there are two approaches to that:
> -  platform (COM/XPCOM/webservices) specific (not recommended for 
> XPCOM, not available for MSCOM, OK for webservices)
> - platform neutral (implemented in recent SVN tree) - (recommended)
> (...)
> Second approach, is to use pregenerated constants file, and rely on 
> universal wrapper vboxapi.py to access constants, like this:
>  virtualBoxManager = VirtualBoxManager(None, None)
>  g_virtualBoxManager.constants.MachineState_Running
>
> Note underscore in constant's name.
> (...)
> Class VirtualBoxManager hides platform-specific implementation 
> details, and allow to write the same Python code for Windows, Linux 
> and webservices.

Hi Nicolay,

Do we have to compile a full VirtualBox distribution from the SVN tree 
to be able to use this new Python interface, or is this SDK distinct 
from the rest of the code (and compatible with the official 2.2.2 
VirtualBox release)?

Regards,
Olivier.







More information about the vbox-dev mailing list