Skip to content

Instantly share code, notes, and snippets.

@gtzilla
Created February 10, 2011 01:28
Show Gist options
  • Save gtzilla/819743 to your computer and use it in GitHub Desktop.
Save gtzilla/819743 to your computer and use it in GitHub Desktop.
python
#!/bin/python
htmls=""
for letter in html:
formatted_letter="{0:{fill}{width}b}".format(ord(letter), width=7, fill="0")
htmls+=formatted_letter
return self.code_pattern % htmls.replace("0", " ").replace("1", "\t")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment