VirtualBox

Ignore:
Timestamp:
May 24, 2010 6:45:35 AM (15 years ago)
Author:
vboxsync
Message:

VBoxShell: small fixes making extention coding easier.

File:
1 edited

Legend:

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

    r29754 r29756  
    136136g_hasreadline = True
    137137try:
    138     import readline
    139     import rlcompleter
     138    if g_hasreadline:
     139        import readline
     140        import rlcompleter
    140141except:
    141142    g_hasreadline = False
     
    27652766    exts = os.listdir(shextdir)
    27662767    for e in exts:
    2767         addExtsFromFile(ctx, cmds, os.path.join(shextdir,e))
     2768        # not editor temporary files, please.
     2769        if e.endswith('.py'):
     2770            addExtsFromFile(ctx, cmds, os.path.join(shextdir,e))
    27682771
    27692772def getHomeFolder(ctx):
    27702773    if ctx['remote'] or ctx['vb'] is None:
     2774        if 'VBOX_USER_HOME' is os.environ:
     2775            return os.path.join(os.environ['VBOX_USER_HOME'])
    27712776        return os.path.join(os.path.expanduser("~"), ".VirtualBox")
    27722777    else:
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