(filename)
return False
Check that the size of the thing which is supposed to be a filename has
    size greater than zero, without following symbolic links or using
    :func:os.path.isfile.

    :param filename: An object to check.
    :rtype: bool
    :returns: True if **filename** is file-like, False otherwise.
Check that the size of the thing which is supposed to be a filename has
    size greater than zero, without following symbolic links or using
    :func:os.path.isfile.
Check that the size of the thing which is supposed to be a filename has size greater than zero without following symbolic links or using : func : os . path . isfile .
def _is_file(filename):
    """Check that the size of the thing which is supposed to be a filename has
    size greater than zero, without following symbolic links or using
    :func:os.path.isfile.

    :param filename: An object to check.
    :rtype: bool
    :returns: True if **filename** is file-like, False otherwise.
    """
    try:
        statinfo = os.lstat(filename)
        log.debug("lstat(%r) with type=%s gave us %r"
                  % (repr(filename), type(filename), repr(statinfo)))
        if not (statinfo.st_size > 0):
            raise ValueError("'%s' appears to be an empty file!" % filename)
    except OSError as oserr:
        log.error(oserr)
        if filename == '-':
            log.debug("Got '-' for filename, assuming sys.stdin...")
            return True
    except (ValueError, TypeError, IOError) as err:
        log.error(err)
    else:
        return True
    return False
def _is_file ( filename ) : try : statinfo = os . lstat ( filename ) log . debug ( "lstat(%r) with type=%s gave us %r" % ( repr ( filename ) , type ( filename ) , repr ( statinfo ) ) ) if not ( statinfo . st_size > 0 ) : raise ValueError ( "'%s' appears to be an empty file!" % filename ) except OSError as oserr : log . error ( oserr ) if filename == '-' : log . debug ( "Got '-' for filename, assuming sys.stdin..." ) return True except ( ValueError , TypeError , IOError ) as err : log . error ( err ) else : return True return False