Ignore:
Timestamp:
03/28/12 20:31:22 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
Message:

Replaced split('\n') with splitlines().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-scripts/orngServer/serverUpdateScripts/updatemiRNA.py

    r6538 r10674  
    5656     
    5757    for s in sections: 
    58         org = str(re.findall('ID\s*(\S*)\s*standard;',s.split('\n')[0])[0]).split('-')[0] 
     58        org = str(re.findall('ID\s*(\S*)\s*standard;',s.splitlines()[0])[0]).split('-')[0] 
    5959        fastprint(os.path.join(path,'%s_sections.txt' % org),'a',s+'//\n') 
    6060         
     
    111111            my_locs=[] # if it's [61..81] you have to take from 60 to 81. 
    112112             
    113             rows = s.split('\n') 
     113            rows = s.splitlines() 
    114114                 
    115115            for r in rows: 
     
    243243     
    244244    zf = zipfile.ZipFile(StringIO.StringIO(urllib.urlopen(tarscan_url).read())) 
    245     arch = zf.read(zf.namelist()[0]).split('\n')[1:] 
     245    arch = zf.read(zf.namelist()[0]).splitlines()[1:] 
    246246    arch.pop() 
    247247    mirnas = [a.split('\t')[3] for a in arch] 
     
    269269         
    270270if flag: 
    271     orgs_des = dict(zip([re.findall('ID\s*(\S{3,4})-\S*\s*standard;',l)[0] for l in data_webPage.split('\n') if l[0:2]=='ID'],[re.findall('DE\s*(.*)\s\S*.*\sstem[\s|-]loop',l)[0] for l in data_webPage.split('\n') if l[0:2]=='DE'])) 
     271    orgs_des = dict(zip([re.findall('ID\s*(\S{3,4})-\S*\s*standard;',l)[0] for l in data_webPage.splitlines() if l[0:2]=='ID'],[re.findall('DE\s*(.*)\s\S*.*\sstem[\s|-]loop',l)[0] for l in data_webPage.splitlines() if l[0:2]=='DE'])) 
    272272     
    273273    file_org = get_intoFiles(path,data_webPage) 
Note: See TracChangeset for help on using the changeset viewer.