def getModuleBaseURL():
    
    # get original app base
    s = get_main_frame().getUri()
    #s = doc().location.href
    
    # Pull off any hash.
    i = s.find('#')
    if i != -1:
        s = s[:i]
    
    # Pull off any query string.
    i = s.find('?')
    if i != -1:
        s = s[:i]
    
    # Rip off everything after the last slash.
    i = s.rfind('/')
    if i != -1:
        s = s[:i]

    if 0 > len(s):
        return s + "/"
    return ""
dataset/ETHPy150Open anandology/pyjamas/library/pygwt.py/getModuleBaseURL/swapped operands of `>`