root/qPloneGoogleMaps/trunk/utility.py
| Revision 534 (checked in by piv, 2 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | |
| 2 | """ Utility module """ |
| 3 | |
| 4 | def processDesc(desc): |
| 5 | """ Utility function for processing objects descriptions """ |
| 6 | import re |
| 7 | pattern1 = re.compile(r'[\r\n]', re.M|re.I) |
| 8 | pattern2 = re.compile(r'[\"]', re.M|re.I) |
| 9 | res = pattern2.sub("'", desc) |
| 10 | return pattern1.sub(' ', res) |
Note: See TracBrowser for help on using the browser.
