Mercurial > pymonkey
diff docs/rendered/_sources/pymonkey.txt @ 113:e616b4605db0
Added doctest for evaluate_script().
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 16 Aug 2009 22:48:50 -0700 |
parents | 2086377c0abe |
children | 87147faa031a |
line wrap: on
line diff
--- a/docs/rendered/_sources/pymonkey.txt Sun Aug 16 21:15:28 2009 -0700 +++ b/docs/rendered/_sources/pymonkey.txt Sun Aug 16 22:48:50 2009 -0700 @@ -137,6 +137,14 @@ `filename`. This metadata is very useful for debugging stack traces, exceptions, and so forth. + For example: + + >>> cx = pymonkey.Runtime().new_context() + >>> obj = cx.new_object() + >>> cx.init_standard_classes(obj) + >>> cx.evaluate_script(obj, '5 * Math', '<string>', 1) + nan + .. method:: call_function(thisobj, func, args) Calls a JavaScript function.