Changeset 3745:18a330745351 in livinglogic.python.xist for src/ll/scripts/uls.py

Show
Ignore:
Timestamp:
04/06/09 11:08:02 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Activate oracle URLs for uls. Use absolute URLs for testing the type.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/scripts/uls.py

    r3744 r3745  
    2222    from ll import astyle 
    2323 
     24try: 
     25    from ll import orasql # Activate oracle URLs 
     26except ImportError: 
     27    pass 
     28 
     29 
    2430style_pad = astyle.Style.fromstr("black:black:bold") 
    2531style_sizeunit = astyle.Style.fromstr("yellow:black") 
     32 
    2633 
    2734def rpad(s, l): 
     
    3239        return astyle.style_default(s, style_pad("."*(l-len(meas)))) 
    3340    return s 
     41 
    3442 
    3543def lpad(s, l): 
     
    106114 
    107115    def printblock(urls, width, spacing): 
    108         urls = [(u, str(u)) for u in urls] 
    109116        (rows, cols) = findcolcount(urls, width, spacing) 
    110117        for i in xrange(rows): 
     
    130137                url.path.segments.append(("",)) 
    131138            if not long and not one: 
    132                 urls = [(url/child).relative(base) for child in url.listdir()] 
     139                urls = [] 
     140                for child in url.listdir(): 
     141                    u = url/child 
     142                    urls.append((u, str(u.relative(base)))) 
    133143                if urls: 
    134144                    printblock(urls, width, spacing)