Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nullie/python-hemi

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-hemi

Synopsis

Hemi is a way to execute Javascript code from Python. It uses Google's V8.

Example usage

>>> import hemi
>>> ctx = hemi.Context()
>>> ctx.eval('2 + 3')
5
>>> ctx.eval('foo = 34')
34
>>> ctx.locals.foo
34
>>> ctx.eval('function test() { return this.toString() }')
<hemi.Undefined object at 0x7fcdab78d260>
>>> ctx.locals.test()
u'[object global]'
>>> ctx.locals.test.apply('hello!')
u'hello!'

Bugs

  • None yet known.

Todo

  • new operator.

About

lightweight v8 bindings

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.