import sys
import os
import subprocess
import SystemLib

#!/usr/bin/env python3

def main():
    PROG = os.path.basename(__file__)
    if len(sys.argv) != 2:
        SystemLib.ogRaiseError(os.getenv('OG_ERR_FORMAT', 1), f"{os.getenv('MSG_FORMAT', 'Usage')}: {PROG} urlmenu")
    
    url = sys.argv[1]
    subprocess.run(['browser', '-qws', url])

if __name__ == "__main__":
    main()
