Skip to content

Instantly share code, notes, and snippets.

@witsch
Created September 23, 2011 18:21
Show Gist options
  • Save witsch/1238086 to your computer and use it in GitHub Desktop.
Save witsch/1238086 to your computer and use it in GitHub Desktop.
Previewing `browser.contents` in Pdb
# 'preview' support for browser tests
alias preview import os, tempfile; out = tempfile.NamedTemporaryFile(mode='w', suffix='.html'); print >> out, browser.contents; out.flush(); _ = os.system("open '%s'" % out.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment