- def __init__(self, prefix):
- while prefix.endswith("/") and prefix != "/": prefix = prefix[:-1]
- self.prefix = prefix
+ def __init__(self, url, **kw):
+ # if constructor isn't called via factory interpret url as filename
+ if not hasattr (self, 'path'):
+ self.path = url
+ self.prefix = self.path.rstrip("/")