fnp
/
edumed.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ce37833d8d0a3ef932747a0b27a3d71bbdafaf70
[edumed.git]
/
contact
/
utils.py
1
def csv_escape(string):
2
return '"' + string.replace('\r\n', ' ').replace('\n', ' ').replace('"', '\"') + '"'
3
4
def csv_prepare(obj):
5
to_escape = obj
6
if not isinstance(obj, unicode):
7
to_escape = str(to_escape)
8
return csv_escape(to_escape)