Skip to content
lodagro edited this page Oct 21, 2011 · 1 revision

# test drive

## Code snippet

Adding a simple python code snippet.

def splitLines(buf):

lines=string.split(buf, 'n') lines=filter(lambda x:x, lines) def removeCarriage(s):

if s[-1]=='r': return s[:-1] else: return s

lines=[removeCarriage(l) for l in lines] return lines

Clone this wiki locally