Changeset 1682:2e2c671e4300 in orange-bioinformatics for _bioinformatics/obiGO.py


Ignore:
Timestamp:
06/12/12 11:15:18 (23 months ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
Message:

Replaced split(\n) with splitlines (closes #1160).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiGO.py

    r1643 r1682  
    177177    def ParseStanza(self, stanza): 
    178178        intern_tags = set(self._INTERN_TAGS) 
    179         for line in stanza.split("\n"): 
     179        for line in stanza.splitlines(): 
    180180            if ":" not in line: 
    181181                continue 
     
    354354        """ Return a list of defined subsets. 
    355355        """ 
    356         return [line.split()[1] for line in self.header.split("\n") if line.startswith("subsetdef:")] 
     356        return [line.split()[1] for line in self.header.splitlines() if line.startswith("subsetdef:")] 
    357357 
    358358    def SetSlimsSubset(self, subset): 
     
    648648        else: 
    649649            f = file 
    650         lines = [line for line in f.read().split("\n") if line.strip()] 
     650        lines = [line for line in f.read().splitlines() if line.strip()] 
    651651        from Orange.orng import orngMisc 
    652652        milestones = orngMisc.progressBarMilestones(len(lines), 100) 
Note: See TracChangeset for help on using the changeset viewer.