Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(132)  |  Call(66)  |  Derive(0)  |  Import(66)

        def load_locale():

    import karesansui
    import gettext
    try:
      t = gettext.translation('messages', karesansui.dirname + "/locale")
    except IOError, err:
      old_lang = os.environ['LANG']
      os.environ['LANG'] = 'en'
      t = gettext.translation('messages', karesansui.dirname + "/locale")
      os.environ['LANG'] = old_lang

    return t.gettext
        


src/k/a/karesansui-HEAD/bin/add_bonding.py   karesansui(Download)
    import karesansui
    from karesansui import __version__
    from karesansui.lib.utils import load_locale, execute_command, \
        get_ifconfig_info, is_writable, create_file, \
        copy_file,         move_file,   get_bridge_info, \
    sys.exit(1)
 
_ = load_locale()
 
usage = '%prog [options]'

src/k/a/karesansui-HEAD/bin/delete_bonding.py   karesansui(Download)
    import karesansui
    from karesansui import __version__
    from karesansui.lib.utils import load_locale, execute_command, get_ifconfig_info, \
        is_writable, create_file, move_file, remove_file, get_bridge_info
    from karesansui.lib.dict_op import DictOp
    sys.exit(1)
 
_ = load_locale()
 
usage = '%prog [options]'

src/k/a/karesansui-HEAD/bin/write_conf.py   karesansui(Download)
    import karesansui
    from karesansui import __version__
    from karesansui.lib.utils import load_locale
    from karesansui.lib.utils import copy_file
    from karesansui.lib.utils import execute_command
    sys.exit(1)
 
_ = load_locale()
 
usage = '%prog [options]'

src/k/a/karesansui-HEAD/bin/karesansui_sysinfo.py   karesansui(Download)
    from karesansui import __app__,__version__,__release__
    from karesansui.lib.virt.virt import KaresansuiVirtConnection
    from karesansui.lib.utils import load_locale
    from karesansui.lib.utils import is_executable, execute_command
    from karesansui.lib.utils import available_virt_uris
    sys.exit(1)
 
_ = load_locale()
 
usage = '%prog [options]'

src/k/a/karesansui-HEAD/bin/ready_mount.py   karesansui(Download)
    import karesansui
    from karesansui import __version__
    from karesansui.lib.utils import load_locale, execute_command, pipe_execute_command, generate_phrase, get_filesystem_info
    from karesansui.lib.const import KARESANSUI_TMP_DIR, MOUNT_CMD, UMOUNT_CMD, FORMAT_CMD, YES_CMD
 
except ImportError, e:
    print >>sys.stderr, "[Error] some packages not found. - %s" % e
    sys.exit(1)
 
_ = load_locale()

src/k/a/karesansui-HEAD/bin/initialize_collectd_conf.py   karesansui(Download)
    import karesansui
    from karesansui import __version__
    from karesansui.lib.utils import load_locale
    from karesansui.lib.utils import copy_file
    from karesansui.lib.utils import execute_command
    sys.exit(1)
 
_ = load_locale()
 
 

src/k/a/karesansui-HEAD/bin/export_guest.py   karesansui(Download)
    from karesansui import __version__
    from karesansui.lib.virt.virt import KaresansuiVirtConnection, KaresansuiVirtException
    from karesansui.lib.utils import load_locale, preprint_r, base64_decode
    from karesansui.db.access.machine import findby1uniquekey
    from karesansui.lib.utils import string_from_uuid     as StrFromUUID
    sys.exit(1)
 
_ = load_locale()
 
usage = '%prog [options]'

src/k/a/karesansui-HEAD/bin/take_snapshot.py   karesansui(Download)
    from karesansui import __version__
    from karesansui.lib.virt.snapshot import KaresansuiVirtSnapshot
    from karesansui.lib.utils import load_locale
    from karesansui.lib.utils import get_xml_parse        as XMLParse
    from karesansui.lib.utils import get_xml_xpath        as XMLXpath
    sys.exit(1)
 
_ = load_locale()
 
usage = '%prog [options]'

src/k/a/karesansui-HEAD/bin/start_guest.py   karesansui(Download)
                                         KaresansuiVirtConnectionAuth, \
                                         VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTDOWN
    from karesansui.lib.utils import load_locale
    from karesansui.lib.utils import uri_split, uri_join
 
except ImportError, e:
    print >>sys.stderr, "[Error] some packages not found. - %s" % e
    sys.exit(1)
 
_ = load_locale()

src/k/a/karesansui-HEAD/bin/reboot_guest.py   karesansui(Download)
                                         KaresansuiVirtConnectionAuth, \
                                         VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTDOWN
    from karesansui.lib.utils import load_locale
    from karesansui.lib.utils import uri_split, uri_join
 
except ImportError, e:
    print >>sys.stderr, "[Error] some packages not found. - %s" % e
    sys.exit(1)
 
_ = load_locale()

  1 | 2 | 3 | 4 | 5 | 6 | 7  Next