PEATDB/Ekin/sparky.py
def find_cols(filename):
    """Get no. of assignment cols in peak file"""
    fd=open(filename)
    lines=fd.readlines()
    fd.close()
    cols=None
    import string
    for line in lines:
        line=string.strip(line)
        if len(line)>0 and 'Assignment' in line:     
            split=line.split()
            print split
            cols = len(split)-1
           
    return cols
Get no. of assignment cols in peak file
Get no. of assignment cols in peak file
Get no . of assignment cols in peak file
def find_cols(filename):
    fd=open(filename)
    lines=fd.readlines()
    fd.close()
    cols=None
    import string
    for line in lines:
        line=string.strip(line)
        if len(line)>0 and 'Assignment' in line:     
            split=line.split()
            print split
            cols = len(split)-1
    return cols
def find_cols ( filename ) : fd = open ( filename ) lines = fd . readlines ( ) fd . close ( ) cols = None import string for line in lines : line = string . strip ( line ) if len ( line ) > 0 and 'Assignment' in line : split = line . split ( ) print split cols = len ( split ) - 1 return cols
Get no.
Get no .
"""Get no. of assignment cols in peak file"""
filename