VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxShell/ws/vboxshell.py@ 18693

Last change on this file since 18693 was 18693, checked in by vboxsync, 16 years ago

SDK: proper SVN props

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1#!/usr/bin/python
2
3#########################################################################################
4#
5# This Python program implements interactive script access to VBox services
6#
7# To run this example you need to have:
8# - Python ZSI installed (see http://pywebsvcs.sourceforge.net/zsi.html)
9# - VirtualBox webservice Python wrappers visible
10# (such as PYTHONPATH=/opt/VirtualBox/sdk/bindings/webservice/python/lib)
11# - VirtualBox webservice running (vboxwebsrv) on the local machine, or whatever WSDL says, for interactive sessions disable object watchdog with -t 0
12#
13#########################################################################################
14from VirtualBox_services import *
15from VirtualBox_wrappers import *
16
17import sys, traceback
18from shellcommon import interpret, PerfCollector
19
20mgr = IWebsessionManager()
21vbox = None
22
23try:
24 vbox = mgr.logon("test", "test")
25except Exception, e:
26 print "Cannot log in:", e
27 traceback.print_exc()
28 print "***********************************************"
29 print "Have you started vboxwebsrv: 'vboxwebsrv -t 0'?"
30 print "***********************************************"
31 sys.exit(1)
32
33ctx = {'mgr':mgr, 'vb':vbox, 'ifaces': g_reflectionInfo, 'remote': True,
34 'perf':PerfCollector(vbox)}
35
36interpret(ctx)
37
38mgr.logoff(vbox)
Note: See TracBrowser for help on using the repository browser.

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