VirtualBox

Ignore:
Timestamp:
Apr 23, 2010 4:42:51 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60535
Message:

python: API to figuire out install directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r28658 r28664  
    12441244        return 0
    12451245    cmd = ' '.join(args[1:])
     1246
    12461247    try:
    12471248        os.system(cmd)
     
    15711572   return 0
    15721573
    1573 
    15741574def findDevOfType(ctx,mach,type):
    15751575    atts = ctx['global'].getArray(mach, 'mediumAttachments')
     
    19311931   dev = args[2]
    19321932   cmdExistingVm(ctx, mach, 'guestlambda', [usbctr,False,dev])
     1933   return 0
     1934
     1935
     1936def guiCmd(ctx,args):
     1937   if (len(args) > 1):
     1938      print "usage: gui"
     1939      return 0
     1940
     1941   binDir = ctx['global'].getBinDir()
     1942
     1943   vbox = os.path.join(binDir, 'VirtualBox')
     1944   try:
     1945        os.system(vbox)
     1946   except KeyboardInterrupt:
     1947        # to allow interruption
     1948        pass
    19331949   return 0
    19341950
     
    20002016            'detachUsb': ['Detach USB device from the VM: detachUsb win uui', detachUsbCmd, 0],
    20012017            'listMediums': ['List mediums known to this VBox instance', listMediumsCmd, 0],
    2002             'listUsb': ['List known USB devices', listUsbCmd, 0]
     2018            'listUsb': ['List known USB devices', listUsbCmd, 0],
     2019            'gui': ['Start GUI frontend', guiCmd, 0]
    20032020            }
    20042021
     
    20742091        commands['connect'] = ["Connect to remote VBox instance", connectCmd, 0]
    20752092        commands['disconnect'] = ["Disconnect from remote VBox instance", disconnectCmd, 0]
    2076    
     2093
    20772094    vbox = ctx['vb']
    20782095
     
    20862103    checkUserExtensions(ctx, commands, home)
    20872104
    2088     hist_file=os.path.join(home, ".vboxshell_history")
     2105    hist_file=os.path.join(home, ".vboxshellhistory")
    20892106    autoCompletion(commands, ctx)
    2090    
     2107
    20912108    if g_hasreadline and os.path.exists(hist_file):
    20922109        readline.read_history_file(hist_file)
Note: See TracChangeset for help on using the changeset viewer.

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