{ "info": { "author": "Vasily Stepanov", "author_email": "vasily.stepanov@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Code Generators" ], "description": "PyWIdl\n======\n\nGeneric code generator from WebIDL interfaces.\n\npywidl parses WebIDL code using PLY, builds the interface object model and emits\nwhatever code using user's mako templates or even user's native python module.\n\n\nWebIDL object model\n-------------------\nDefined in pywidl/model.py\n\nCommon usage in tests/idl.py\n\n\n\nExample usage\n-------------\n\n$ cat fragment.idl\n\n exception GraphicsException {\n DOMString reason;\n };\n\n interface Paint { };\n\n interface SolidColor : Paint {\n attribute float red;\n attribute float green;\n attribute float blue;\n };\n\n interface Pattern : Paint {\n attribute DOMString imageURL;\n };\n\n [Constructor]\n interface GraphicalWindow {\n readonly attribute unsigned long width;\n readonly attribute unsigned long height;\n\n attribute Paint currentPaint;\n\n void drawRectangle(float x, float y, float width, float height);\n\n void drawText(float x, float y, DOMString text);\n };\n\n$ cat mako.tpl\n\n // ${foo}\n % for definition in definitions:\n ${definition.name}\n % endfor\n\n$ pywidl -m -o fragment.txt -t mako.tpl fragment.idl -- --foo=bar\n\n$ cat fragment.txt\n \n // bar\n GraphicsException\n Paint\n SolidColor\n Pattern\n GraphicalWindow\n\n$ cat native.py\n\n def render(definitions=[], source=None, output=None,\n template=None, template_type=None, foo=None, **kwargs):\n\n with open(output, 'w') as out:\n print >>out, \"// %s\" % foo\n for definition in definitions:\n print >>out, definition.name\n\n$ PYTHONPATH=\".:$PYTHONPATH\"\npywidl -n -o fragment.txt -t native fragment.idl-- --foo=bar\n\n$ cat fragment.txt\n\n // bar\n GraphicsException\n Paint\n SolidColor\n Pattern\n GraphicalWindow", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/VasilyStepanov/pywidl", "keywords": "webidl", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pywidl", "package_url": "https://pypi.org/project/pywidl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pywidl/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/VasilyStepanov/pywidl" }, "release_url": "https://pypi.org/project/pywidl/0.1/", "requires_dist": null, "requires_python": null, "summary": "Generic code generator from WebIDL interfaces.", "version": "0.1" }, "last_serial": 798260, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "dea754c69172a8ad2e1ebe7945d6248e", "sha256": "7afba99c9e70a4e1ed4a30b8110359d3b0772149f5dbd07ec84e5d9fdd5ea289" }, "downloads": -1, "filename": "pywidl-0.1-py2.7.egg", "has_sig": false, "md5_digest": "dea754c69172a8ad2e1ebe7945d6248e", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 53610, "upload_time": "2012-03-31T16:58:08", "url": "https://files.pythonhosted.org/packages/ea/ee/0294d4ce11885ef9af549fd96294ed7776e22c3a6717c59d0a94896851cd/pywidl-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "2a62704d8f1e9abdf6fa55cb355c22b6", "sha256": "d77a6170117e8725ea0d7e5f65e223dd53af7151cee19d0eb80fd714643d9286" }, "downloads": -1, "filename": "pywidl-0.1.tar.gz", "has_sig": false, "md5_digest": "2a62704d8f1e9abdf6fa55cb355c22b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18920, "upload_time": "2012-03-31T16:58:14", "url": "https://files.pythonhosted.org/packages/d9/c3/38a07b0e37bc74c1559ea0c0a04ba9e9ec0f8878dea0b4794dd2bedc6c54/pywidl-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dea754c69172a8ad2e1ebe7945d6248e", "sha256": "7afba99c9e70a4e1ed4a30b8110359d3b0772149f5dbd07ec84e5d9fdd5ea289" }, "downloads": -1, "filename": "pywidl-0.1-py2.7.egg", "has_sig": false, "md5_digest": "dea754c69172a8ad2e1ebe7945d6248e", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 53610, "upload_time": "2012-03-31T16:58:08", "url": "https://files.pythonhosted.org/packages/ea/ee/0294d4ce11885ef9af549fd96294ed7776e22c3a6717c59d0a94896851cd/pywidl-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "2a62704d8f1e9abdf6fa55cb355c22b6", "sha256": "d77a6170117e8725ea0d7e5f65e223dd53af7151cee19d0eb80fd714643d9286" }, "downloads": -1, "filename": "pywidl-0.1.tar.gz", "has_sig": false, "md5_digest": "2a62704d8f1e9abdf6fa55cb355c22b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18920, "upload_time": "2012-03-31T16:58:14", "url": "https://files.pythonhosted.org/packages/d9/c3/38a07b0e37bc74c1559ea0c0a04ba9e9ec0f8878dea0b4794dd2bedc6c54/pywidl-0.1.tar.gz" } ] }