Skip to content

Instantly share code, notes, and snippets.

@kgleeson
kgleeson / gist:3702104
Created September 11, 2012 21:13 — forked from zeffii/gist:3702095
def escape_html(s):
for i, v in ('&', '&amp;'), ('<', '&lt;'), ('"', '&quot;'), ('>', '&gt;'):
if i in s:
s = s.replace(i,v)
return s
@kgleeson
kgleeson / buze_updater.py
Created February 10, 2012 19:44 — forked from zeffii/buze_updater.py
slow start.
'''
py 2.7
assumptions:
- buze is currently running in a dir located outside of program files
- the dir is either formatted like: buze-x.x.x or buze-x.x.x-revision
[x]- read externally the name of latest version and revision.
[ ]- if version and revision equal current, offer to cease now.
[x]- get current buze path, go up level.