======
Generic code generator from WebIDL interfaces.
pywidl parses WebIDL code using PLY, builds the interface object model and emits
whatever code using user's mako templates or even user's native python module.
WebIDL object model
-------------------
Defined in pywidl/model.py
Common usage in tests/idl.py
Example usage
-------------
$ cat fragment.idl
exception GraphicsException {
DOMString reason;
};
interface Paint { };
interface SolidColor : Paint {
attribute float red;
attribute float green;
attribute float blue;
};
interface Pattern : Paint {
attribute DOMString imageURL;
};
[Constructor]
interface GraphicalWindow {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
attribute Paint currentPaint;
void drawRectangle(float x, float y, float width, float height);
void drawText(float x, float y, DOMString text);
};
$ cat mako.tpl
// ${foo}
% for definition in definitions:
${definition.name}
% endfor
$ pywidl -m -o fragment.txt -t mako.tpl fragment.idl -- --foo=bar
$ cat fragment.txt
// bar
GraphicsException
Paint
SolidColor
Pattern
GraphicalWindow
$ cat native.py
def render(definitions=[], source=None, output=None,
template=None, template_type=None, foo=None, **kwargs):
with open(output, 'w') as out:
print >>out, "// %s" % foo
for definition in definitions:
print >>out, definition.name
$ PYTHONPATH=".:$PYTHONPATH"
pywidl -n -o fragment.txt -t native fragment.idl-- --foo=bar
$ cat fragment.txt
// bar
GraphicsException
Paint
SolidColor
Pattern
GraphicalWindow
Metadata
Release files for pywidl 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pywidl-0.1.tar.gz | 18.9 kB | Without provenance | Details for pywidl-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pywidl-0.1-py2.7.egg | Legacy Egg format | - | - | Details for pywidl-0.1-py2.7.egg |
Total release size: 72.5 kB
Release files / pywidl-0.1.tar.gz
| Download URL | pywidl-0.1.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d77a6170117e8725ea0d7e5f65e223dd53af7151cee19d0eb80fd714643d9286
|
|
BLAKE2b-256 checksum How to use checksums |
d9c338a07b0e37bc74c1559ea0c0a04ba9e9ec0f8878dea0b4794dd2bedc6c54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pywidl-0.1-py2.7.egg
| Download URL | pywidl-0.1-py2.7.egg |
|---|---|
| Size | 53.6 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7afba99c9e70a4e1ed4a30b8110359d3b0772149f5dbd07ec84e5d9fdd5ea289
|
|
BLAKE2b-256 checksum How to use checksums |
eaee0294d4ce11885ef9af549fd96294ed7776e22c3a6717c59d0a94896851cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pywidl 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.