Example #1
0
def main():
    cfg_files = (
        # first look in current dir
        os.path.join(os.getcwd(), ".vamosrc"),
        # then in home dir
        os.path.expanduser("~/.vamosrc"),
    )
    sys.exit(vmain(cfg_files))
Example #2
0
def main():
  cfg_files = (
      # first look in current dir
      os.path.join(os.getcwd(), ".vamosrc"),
      # then in home dir
      os.path.expanduser("~/.vamosrc"),
  )
  sys.exit(vmain(cfg_files))
Example #3
0
def main():
  cfg_files = (
      # first look in current dir
      os.path.join(os.getcwd(), ".vamosrc"),
      # then in home dir
      os.path.expanduser("~/.vamosrc"),
  )
  # profile run?
  if 'VAMOS_PROFILE' in os.environ:
    vamos_profile = os.environ['VAMOS_PROFILE']
    if vamos_profile == 'dump':
      profile_file = None
    else:
      profile_file = vamos_profile
    ret_code = main_profile(cfg_files,
                            profile_file=profile_file,
                            dump_profile=True)
  # regular run
  else:
    ret_code = vmain(cfg_files)
  sys.exit(ret_code)
Example #4
0
def main(args=None):
    cfg_files = (
        # first look in current dir
        os.path.join(os.getcwd(), ".vamosrc"),
        # then in home dir
        os.path.expanduser("~/.vamosrc"),
    )
    # profile run?
    if "VAMOS_PROFILE" in os.environ:
        vamos_profile = os.environ["VAMOS_PROFILE"]
        if vamos_profile == "dump":
            profile_file = None
        else:
            profile_file = vamos_profile
        ret_code = main_profile(
            cfg_files, args=args, profile_file=profile_file, dump_profile=True
        )
    # regular run
    else:
        ret_code = vmain(cfg_files, args=args)
    return ret_code
Example #5
0
def main():
    cfg_files = (
        # first look in current dir
        os.path.join(os.getcwd(), ".vamosrc"),
        # then in home dir
        os.path.expanduser("~/.vamosrc"),
    )
    # profile run?
    if 'VAMOS_PROFILE' in os.environ:
        vamos_profile = os.environ['VAMOS_PROFILE']
        if vamos_profile == 'dump':
            profile_file = None
        else:
            profile_file = vamos_profile
        ret_code = main_profile(cfg_files,
                                profile_file=profile_file,
                                dump_profile=True)
    # regular run
    else:
        ret_code = vmain(cfg_files)
    sys.exit(ret_code)