예제 #1
0
파일: bundle.py 프로젝트: nnen/nmapps
 def is_egg(cls, pth):
     pth = Path.make(pth)
     
     if pth.extension.lower() <> "egg":
         return False
     if not pth.is_file:
         return False
     return True
예제 #2
0
파일: bundle.py 프로젝트: nnen/nmapps
def get_bundle(pth = "."):
    pth = Path.make(pth).real
    
    bundle = Bundle(pth)
    
    for parent in pth.iter_parents():
        if Egg.is_egg(parent):
            return Egg(parent)
        if (parent + INIT_FILE).is_file:
            bundle = Bundle(parent)
    
    return bundle