Skip to content

Instantly share code, notes, and snippets.

@chris-martin
Created June 2, 2014 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-martin/4ae1358e6d5fba6431a1 to your computer and use it in GitHub Desktop.
Save chris-martin/4ae1358e6d5fba6431a1 to your computer and use it in GitHub Desktop.
def include_script(browser, path):
with open(path, 'r') as f:
script = f.read()
browser.execute_script(script)
def sizzle_path():
import djungle.sizzle
return os.path.join(os.path.dirname(djungle.sizzle.__file__),
'static', 'djungle', 'sizzle.js')
def include_sizzle(browser):
include_script(browser=browser, path=sizzle_path())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment