comparison docs/rendered/index.html @ 170:dd32a92f6b4f

Initial attempt at renaming pymonkey to pydermonkey.
author Atul Varma <varmaa@toolness.com>
date Tue, 01 Sep 2009 03:07:24 -0700
parents 699d03db6614
children
comparison
equal deleted inserted replaced
169:2b98d4643c44 170:dd32a92f6b4f
3 3
4 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head> 5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 7
8 <title>Pymonkey Documentation &mdash; Pymonkey v0.0.1 documentation</title> 8 <title>Pydermonkey Documentation &mdash; Pydermonkey v0.0.1 documentation</title>
9 <link rel="stylesheet" href="_static/default.css" type="text/css" /> 9 <link rel="stylesheet" href="_static/default.css" type="text/css" />
10 <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 10 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
11 <script type="text/javascript"> 11 <script type="text/javascript">
12 var DOCUMENTATION_OPTIONS = { 12 var DOCUMENTATION_OPTIONS = {
13 URL_ROOT: '', 13 URL_ROOT: '',
17 HAS_SOURCE: true 17 HAS_SOURCE: true
18 }; 18 };
19 </script> 19 </script>
20 <script type="text/javascript" src="_static/jquery.js"></script> 20 <script type="text/javascript" src="_static/jquery.js"></script>
21 <script type="text/javascript" src="_static/doctools.js"></script> 21 <script type="text/javascript" src="_static/doctools.js"></script>
22 <link rel="top" title="Pymonkey v0.0.1 documentation" href="" /> 22 <link rel="top" title="Pydermonkey v0.0.1 documentation" href="" />
23 <link rel="next" title="pymonkey — Access SpiderMonkey from Python" href="pymonkey.html" /> 23 <link rel="next" title="pydermonkey — Access SpiderMonkey from Python" href="pydermonkey.html" />
24 </head> 24 </head>
25 <body> 25 <body>
26 <div class="related"> 26 <div class="related">
27 <h3>Navigation</h3> 27 <h3>Navigation</h3>
28 <ul> 28 <ul>
31 accesskey="I">index</a></li> 31 accesskey="I">index</a></li>
32 <li class="right" > 32 <li class="right" >
33 <a href="modindex.html" title="Global Module Index" 33 <a href="modindex.html" title="Global Module Index"
34 accesskey="M">modules</a> |</li> 34 accesskey="M">modules</a> |</li>
35 <li class="right" > 35 <li class="right" >
36 <a href="pymonkey.html" title="pymonkey — Access SpiderMonkey from Python" 36 <a href="pydermonkey.html" title="pydermonkey — Access SpiderMonkey from Python"
37 accesskey="N">next</a> |</li> 37 accesskey="N">next</a> |</li>
38 <li><a href="">Pymonkey v0.0.1 documentation</a> &raquo;</li> 38 <li><a href="">Pydermonkey v0.0.1 documentation</a> &raquo;</li>
39 </ul> 39 </ul>
40 </div> 40 </div>
41 41
42 <div class="document"> 42 <div class="document">
43 <div class="documentwrapper"> 43 <div class="documentwrapper">
44 <div class="bodywrapper"> 44 <div class="bodywrapper">
45 <div class="body"> 45 <div class="body">
46 46
47 <div class="section" id="pymonkey-documentation"> 47 <div class="section" id="pydermonkey-documentation">
48 <h1>Pymonkey Documentation<a class="headerlink" href="#pymonkey-documentation" title="Permalink to this headline">¶</a></h1> 48 <h1>Pydermonkey Documentation<a class="headerlink" href="#pydermonkey-documentation" title="Permalink to this headline">¶</a></h1>
49 <p>Pymonkey is a Python C extension module to expose the <a class="reference" href="https://developer.mozilla.org/en/SpiderMonkey">Mozilla 49 <p>Pydermonkey is a Python C extension module to expose the <a class="reference" href="https://developer.mozilla.org/en/SpiderMonkey">Mozilla
50 SpiderMonkey</a> engine 50 SpiderMonkey</a> engine
51 to Python.</p> 51 to Python.</p>
52 <ul> 52 <ul>
53 <li class="toctree-l1"><a class="reference" href="pymonkey.html"><tt class="docutils literal"><span class="pre">pymonkey</span></tt> &#8212; Access SpiderMonkey from Python</a></li> 53 <li class="toctree-l1"><a class="reference" href="pydermonkey.html"><tt class="docutils literal"><span class="pre">pydermonkey</span></tt> &#8212; Access SpiderMonkey from Python</a></li>
54 </ul> 54 </ul>
55 <p>Rationale and Goals:</p> 55 <p>Rationale and Goals:</p>
56 <ul> 56 <ul>
57 <li><p class="first">Python and JS are fairly complementary languages. Python provides 57 <li><p class="first">Python and JS are fairly complementary languages. Python provides
58 tremendous developer productivity via its dynamic language 58 tremendous developer productivity via its dynamic language
67 side&#8211;particularly untrusted JS. For instance, being able to 67 side&#8211;particularly untrusted JS. For instance, being able to
68 duplicate business logic on the server and client (i.e., browser) 68 duplicate business logic on the server and client (i.e., browser)
69 would be very useful. Standards-based solutions like <a class="reference" href="https://wiki.mozilla.org/ServerJS">ServerJS</a> are currently paving the way 69 would be very useful. Standards-based solutions like <a class="reference" href="https://wiki.mozilla.org/ServerJS">ServerJS</a> are currently paving the way
70 in this field. There&#8217;s Java-based solutions like Rhino out there, 70 in this field. There&#8217;s Java-based solutions like Rhino out there,
71 but nothing really mature is available for the Python 71 but nothing really mature is available for the Python
72 world. Ideally, Pymonkey should enable a Python programmer to create 72 world. Ideally, Pydermonkey should enable a Python programmer to create
73 a custom sandboxed environment for executing JS code without needing 73 a custom sandboxed environment for executing JS code without needing
74 to write any C.</p> 74 to write any C.</p>
75 </li> 75 </li>
76 <li><p class="first">Pymonkey should have awesome Sphinx documentation with doctests and 76 <li><p class="first">Pydermonkey should have awesome Sphinx documentation with doctests and
77 all the trappings of a model Python package. Not only should it be 77 all the trappings of a model Python package. Not only should it be
78 easy for Python programmers to learn how to use the module, but it 78 easy for Python programmers to learn how to use the module, but it
79 should also be easy for them to learn more about how SpiderMonkey 79 should also be easy for them to learn more about how SpiderMonkey
80 works by reading the documentation and playing around with the code.</p> 80 works by reading the documentation and playing around with the code.</p>
81 </li> 81 </li>
82 <li><p class="first">Pymonkey needs to have outstanding developer ergonomics. Full 82 <li><p class="first">Pydermonkey needs to have outstanding developer ergonomics. Full
83 cross-language stack tracebacks should be available, for instance, 83 cross-language stack tracebacks should be available, for instance,
84 and developers should be able to easily debug. Access to memory 84 and developers should be able to easily debug. Access to memory
85 profiling facilities in JS-land is a must.</p> 85 profiling facilities in JS-land is a must.</p>
86 </li> 86 </li>
87 <li><p class="first">The module uses the Python C API: no SWIG, Pyrex, or other 87 <li><p class="first">The module uses the Python C API: no SWIG, Pyrex, or other
101 before, so he wanted to give it a try.</p> 101 before, so he wanted to give it a try.</p>
102 </li> 102 </li>
103 </ul> 103 </ul>
104 <div class="section" id="building-testing-and-installing"> 104 <div class="section" id="building-testing-and-installing">
105 <h2>Building, Testing, and Installing<a class="headerlink" href="#building-testing-and-installing" title="Permalink to this headline">¶</a></h2> 105 <h2>Building, Testing, and Installing<a class="headerlink" href="#building-testing-and-installing" title="Permalink to this headline">¶</a></h2>
106 <p>From the root of your pymonkey repository, run:</p> 106 <p>From the root of your pydermonkey repository, run:</p>
107 <div class="highlight-python"><pre>python setup.py build test</pre> 107 <div class="highlight-python"><pre>python setup.py build test</pre>
108 </div> 108 </div>
109 <p>This will fetch and compile SpiderMonkey, build the C extension, and 109 <p>This will fetch and compile SpiderMonkey, build the C extension, and
110 run its test suite to ensure that everything works properly.</p> 110 run its test suite to ensure that everything works properly.</p>
111 <p>Then run:</p> 111 <p>Then run:</p>
114 <p>Note that if you&#8217;re on Windows, you won&#8217;t need the <tt class="docutils literal"><span class="pre">sudo</span></tt> bit.</p> 114 <p>Note that if you&#8217;re on Windows, you won&#8217;t need the <tt class="docutils literal"><span class="pre">sudo</span></tt> bit.</p>
115 </div> 115 </div>
116 <div class="section" id="challenges"> 116 <div class="section" id="challenges">
117 <h2>Challenges<a class="headerlink" href="#challenges" title="Permalink to this headline">¶</a></h2> 117 <h2>Challenges<a class="headerlink" href="#challenges" title="Permalink to this headline">¶</a></h2>
118 <p>There&#8217;s a number of challenges that need to be resolved before 118 <p>There&#8217;s a number of challenges that need to be resolved before
119 pymonkey can be really usable. Here&#8217;s some of them.</p> 119 pydermonkey can be really usable. Here&#8217;s some of them.</p>
120 <p><strong>Garbage Collection</strong></p> 120 <p><strong>Garbage Collection</strong></p>
121 <p>Python&#8217;s garbage collection uses reference counting, whereas 121 <p>Python&#8217;s garbage collection uses reference counting, whereas
122 SpiderMonkey&#8217;s is mark-and-sweep. It&#8217;s possible for there to be 122 SpiderMonkey&#8217;s is mark-and-sweep. It&#8217;s possible for there to be
123 situations where there are cycles that exist between SpiderMonkey and 123 situations where there are cycles that exist between SpiderMonkey and
124 Python objects; this is actually quite similar to the relationship 124 Python objects; this is actually quite similar to the relationship
125 between XPCOM and JavaScript in the Mozilla platform&#8211;XPCOM uses 125 between XPCOM and JavaScript in the Mozilla platform&#8211;XPCOM uses
126 reference counting too&#8211;so detecting such cycles will probably involve 126 reference counting too&#8211;so detecting such cycles will probably involve
127 creating something akin to <a class="reference" href="https://developer.mozilla.org/en/Interfacing_with_the_XPCOM_cycle_collector">XPCOM&#8217;s cycle collector</a>.</p> 127 creating something akin to <a class="reference" href="https://developer.mozilla.org/en/Interfacing_with_the_XPCOM_cycle_collector">XPCOM&#8217;s cycle collector</a>.</p>
128 <p>For the time being, however, such cycles can be manually broken via 128 <p>For the time being, however, such cycles can be manually broken via
129 <a title="pymonkey.Context.clear_object_private" class="reference" href="pymonkey.html#pymonkey.Context.clear_object_private"><tt class="xref docutils literal"><span class="pre">pymonkey.Context.clear_object_private()</span></tt></a> on valid objects and functions.</p> 129 <a title="pydermonkey.Context.clear_object_private" class="reference" href="pydermonkey.html#pydermonkey.Context.clear_object_private"><tt class="xref docutils literal"><span class="pre">pydermonkey.Context.clear_object_private()</span></tt></a> on valid objects and functions.</p>
130 </div> 130 </div>
131 <div class="section" id="indices-and-tables"> 131 <div class="section" id="indices-and-tables">
132 <h2>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2> 132 <h2>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
133 <ul class="simple"> 133 <ul class="simple">
134 <li><a class="reference" href="genindex.html"><em>Index</em></a></li> 134 <li><a class="reference" href="genindex.html"><em>Index</em></a></li>
144 </div> 144 </div>
145 <div class="sphinxsidebar"> 145 <div class="sphinxsidebar">
146 <div class="sphinxsidebarwrapper"> 146 <div class="sphinxsidebarwrapper">
147 <h3><a href="">Table Of Contents</a></h3> 147 <h3><a href="">Table Of Contents</a></h3>
148 <ul> 148 <ul>
149 <li><a class="reference" href="">Pymonkey Documentation</a><ul> 149 <li><a class="reference" href="">Pydermonkey Documentation</a><ul>
150 <li><a class="reference" href="#building-testing-and-installing">Building, Testing, and Installing</a></li> 150 <li><a class="reference" href="#building-testing-and-installing">Building, Testing, and Installing</a></li>
151 <li><a class="reference" href="#challenges">Challenges</a></li> 151 <li><a class="reference" href="#challenges">Challenges</a></li>
152 <li><a class="reference" href="#indices-and-tables">Indices and Tables</a></li> 152 <li><a class="reference" href="#indices-and-tables">Indices and Tables</a></li>
153 </ul> 153 </ul>
154 </li> 154 </li>
155 </ul> 155 </ul>
156 156
157 <h4>Next topic</h4> 157 <h4>Next topic</h4>
158 <p class="topless"><a href="pymonkey.html" 158 <p class="topless"><a href="pydermonkey.html"
159 title="next chapter"><tt class="docutils literal"><span class="pre">pymonkey</span></tt> &#8212; Access SpiderMonkey from Python</a></p> 159 title="next chapter"><tt class="docutils literal"><span class="pre">pydermonkey</span></tt> &#8212; Access SpiderMonkey from Python</a></p>
160 <h3>This Page</h3> 160 <h3>This Page</h3>
161 <ul class="this-page-menu"> 161 <ul class="this-page-menu">
162 <li><a href="_sources/index.txt" 162 <li><a href="_sources/index.txt"
163 rel="nofollow">Show Source</a></li> 163 rel="nofollow">Show Source</a></li>
164 </ul> 164 </ul>
187 >index</a></li> 187 >index</a></li>
188 <li class="right" > 188 <li class="right" >
189 <a href="modindex.html" title="Global Module Index" 189 <a href="modindex.html" title="Global Module Index"
190 >modules</a> |</li> 190 >modules</a> |</li>
191 <li class="right" > 191 <li class="right" >
192 <a href="pymonkey.html" title="pymonkey — Access SpiderMonkey from Python" 192 <a href="pydermonkey.html" title="pydermonkey — Access SpiderMonkey from Python"
193 >next</a> |</li> 193 >next</a> |</li>
194 <li><a href="">Pymonkey v0.0.1 documentation</a> &raquo;</li> 194 <li><a href="">Pydermonkey v0.0.1 documentation</a> &raquo;</li>
195 </ul> 195 </ul>
196 </div> 196 </div>
197 <div class="footer"> 197 <div class="footer">
198 &copy; Copyright 2009, Atul Varma. 198 &copy; Copyright 2009, Atul Varma.
199 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2. 199 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.