view light9/clientsession.py @ 2307:45c89eb6dd4c

no cyclone at import time. i can't even install it now
author drewp@bigasterisk.com
date Wed, 31 May 2023 02:16:49 -0700
parents f066d6e874db
children
line wrap: on
line source

"""
some clients will support the concept of a named session that keeps
multiple instances of that client separate
"""
from rdflib import URIRef
from urllib.parse import quote
from light9 import showconfig


def add_option(parser):
    parser.add_option(
        '-s',
        '--session',
        help="name of session used for levels and window position",
        default='default')


def getUri(appName, opts):
    return URIRef("%s/sessions/%s/%s" %
                  (showconfig.showUri(), appName, quote(opts.session, safe='')))