Mercurial > pymonkey
comparison README @ 36:04a6e9a67ae5
Added a bit to the README.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 02 Jul 2009 15:29:07 -0700 |
parents | 3e66613d1d4d |
children | 7401af070bb8 |
comparison
equal
deleted
inserted
replaced
35:3e66613d1d4d | 36:04a6e9a67ae5 |
---|---|
4 Pymonkey is a pure Python CAPI module to expose the Mozilla | 4 Pymonkey is a pure Python CAPI module to expose the Mozilla |
5 SpiderMonkey engine to Python. | 5 SpiderMonkey engine to Python. |
6 | 6 |
7 Rationale and Goals: | 7 Rationale and Goals: |
8 | 8 |
9 * Python and JS are fairly complementary languages. Python provides | |
10 tremendous developer productivity via its dynamic language | |
11 features, its vibrant library of third-party client-side code, and | |
12 its ease of readability. JavaScript, on the other hand, is widely | |
13 known by a vast number of casual programmers due to its | |
14 availability in web browsers; it was also envisioned from its | |
15 conception to be executed as untrusted code, which gives it a lot | |
16 of security features that Python has always lacked. | |
17 | |
9 * There's an increasing need for being able to run JS on the server | 18 * There's an increasing need for being able to run JS on the server |
10 side--particularly untrusted JS [1]. There's Java-based solutions | 19 side--particularly untrusted JS [1]. For instance, being able to |
11 like Rhino out there, but nothing really mature is available for | 20 duplicate business logic on the server and client (i.e., browser) |
12 the Python world. Ideally, Pymonkey should enable a Python | 21 would be very useful. There's Java-based solutions like Rhino out |
13 programmer to create a custom sandboxed environment for executing | 22 there, but nothing really mature is available for the Python |
14 JS code without needing to write any C. | 23 world. Ideally, Pymonkey should enable a Python programmer to |
24 create a custom sandboxed environment for executing JS code | |
25 without needing to write any C. | |
15 | 26 |
16 * Pymonkey should have awesome Sphinx documentation with doctests | 27 * Pymonkey should have awesome Sphinx documentation with doctests |
17 and all the trappings of a model Python package. Not only should | 28 and all the trappings of a model Python package. Not only should |
18 it be easy for Python programmers to learn how to use the module, | 29 it be easy for Python programmers to learn how to use the module, |
19 but it should also be easy for them to learn more about how | 30 but it should also be easy for them to learn more about how |
20 SpiderMonkey works by reading the docs and playing around with the | 31 SpiderMonkey works by reading the docs and playing around with the |
21 code. | 32 code. |
22 | 33 |
23 * Pymonkey needs to have outstanding developer ergonomics. Full | 34 * Pymonkey needs to have outstanding developer ergonomics. Full |
24 cross-language stack tracebacks should be available, for instance, | 35 cross-language stack tracebacks should be available, for instance, |
25 and developers should be able to easily debug. Access to memory | 36 and developers should be able to easily debug. Access to memory |
26 profiling facilities in JS-land is a must. | 37 profiling facilities in JS-land is a must. |
27 | 38 |
28 * The module uses the Python CAPI: no SWIG, Pyrex, or other | 39 * The module uses the Python CAPI: no SWIG, Pyrex, or other |
29 intermediaries. The obvious disadvantage here is that it means | 40 intermediaries. The obvious disadvantage here is that it means |
30 more C code, but the advantages are that | 41 more C code, but the advantages are that |
67 | 78 |
68 Example Code | 79 Example Code |
69 ------------ | 80 ------------ |
70 | 81 |
71 Right now the only example code that exists is in the test suite at | 82 Right now the only example code that exists is in the test suite at |
72 test_pymonkey.py. Check it out and feel free to add more. | 83 test_pymonkey.py. Check it out and feel free to add more. |
73 | 84 |
74 Challenges | 85 Challenges |
75 ---------- | 86 ---------- |
76 | 87 |
77 There's a number of challenges that need to be resolved before | 88 There's a number of challenges that need to be resolved before |