Message6439

Author yyamano
Recipients yyamano
Date 2011-03-16.05:07:21
SpamBayes Score 1.9199595e-09
Marked as misclassified No
Message-id <1300252042.15.0.307377929241.issue1719@psf.upfronthosting.co.za>
In-reply-to
Content
We don't have developers doc for adding builtin modules.

Here is the incomplete instructions to add a builtin module.
Looking at org.python.modules.zipimport might be help.

- Add the mpodule to src/org/python/modules/Setup.java
- Create a module directory as a org.python.modules.YOUR_PACKAGE
- Create a Module as a class. It implements ClassDictInit and add a static
  method classDictInit(PyObject dict).
- Add name of exposed classes in the module to the dict in classDictInit().
- Add @ExposedType to the classes
- Add TYPE field to the classes
- Add a constructor with single PyType argument.
- Add super() to constructors
- Add src/templates/EXPOSED_CLASS_NAME.derived
- Add new entry for EXPOSED_CLASS_NAME.derived to mappings file in the same directory.
- Move src/templates/ and run the following command.
  % python gderived.py EXPOSED_CLASS_NAME.derived
History
Date User Action Args
2011-03-16 05:07:22yyamanosetrecipients: + yyamano
2011-03-16 05:07:22yyamanosetmessageid: <1300252042.15.0.307377929241.issue1719@psf.upfronthosting.co.za>
2011-03-16 05:07:22yyamanolinkissue1719 messages
2011-03-16 05:07:21yyamanocreate