Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)

        def checkForZip(fileName):
    supportedExtension=["zip", "gzip", "gz", "bz2"]
    
    try:
        fileName=filter(os.path.exists, ['.'.join([fileName, ext]) for ext in supportedExtension])[0]
    except:
        pass

    return fileName
        


src/a/i/AIGO-0.1.0/AIGO/IO.py   AIGO(Download)
 
from AIGO import logger
from AIGO.utils.File  import checkForZip, readFile
 
IOType={"GO Annotation File":"GAF", "Blast2GO":"B2G", "Affymetrix":"AFFY", "ArrayIDer":"AID", "Mapping GPid GOids": "GP2GO"}
    """
 
    fileName= str(checkForZip(fileName))
    if (not os.path.exists(fileName)):
        raise IOError(fileName + " does not exist and is required ")
    """
 
    fileName= str(checkForZip(fileName))
    if (not os.path.exists(fileName)):
        raise IOError(fileName + " does not exist and is required ")
    """
 
    fileName= str(checkForZip(fileName))
    if (not os.path.exists(fileName)):
        raise IOError(fileName + " does not exist and is required ")
def extract_AID(fileName, G, refSet=None):
    fileName= checkForZip(fileName)
    if (not os.path.exists(fileName)):
        raise IOError(fileName+" does not exist and is required ")
 

src/a/i/AIGO-0.1.0/AIGO/ReferenceSet.py   AIGO(Download)
 
from AIGO import logger, logFun
from AIGO.utils.File  import checkForZip, readFile
 
 
                self.refType=[self.refType,refType]
 
        fileName= checkForZip(fileName)
        if (not os.path.exists(fileName)):
            logger.handleFatal(fileName+" does not exist and is required ")

src/a/i/AIGO-0.1.0/AIGO/go/OBO.py   AIGO(Download)
 
from AIGO import logger, logFun
from AIGO.utils.File  import checkForZip, readFile
from AIGO.go.GOGraph import get_GOGraph
 
    try:
        if force:
            fileName= checkForZip(fileName)
            if (not os.path.exists(fileName)):
                raise IOError(fileName+" does not exist and is required ")