{ "info": { "author": "Andrew Straw", "author_email": "strawman@astraw.com", "bugtrack_url": null, "classifiers": [], "description": "Background\n----------\n\nThis is a very crude hack to make Enthought's Traits_ work in a\nmulti-process situation. Let's say a process called Alice has a\nvariable called camera, which is an instance of (a subclass of)\nHasTraits. Now, if another process called Bob wants to be notified\nwhen camera.shutter changes, this should happen using the normal\nTraits machinery. Furthermore, if Bob wants to change Alice's\ncamera.shutter settings, Alice should be notified of those changes.\n\nThere was a little discussion_ on this subject on the enthought-dev\nemail list, with Robert Kern's idea being to use Python 2.6's\nmultiprocess module to create Proxy objects of HasTraits subclasses\nwhich would transparently do this. I suspect such an approach would be\nvery slick, but was beyond my one-day abilities, and I was on a\ndeadline to get some code working.\n\nTherefore, I created a hack: both the Alice and Bob processes have\nfull copies of the camera instance which mirror each other. For my\nreal world usage, Alice's camera instance would be connected to\nsomething that actually *does* something, such as take pictures with a\nreal camera, whereas Bob's camera instance would be connected to a GUI\non a remote computer. The synchronization between the two processes\nhappens using Pyro_ (Python remote objects). (The dependency on Pyro\ncould probably be removed in favor of using multiprocess, but I was\nalready familiar with Pyro and couldn't immediately figure out how to\ndo the equivalent things with multiprocess.)\n\nAnyhow, that is the motivation behing the example here. I plan to\ncontinue tinkering with this code until it's working for me in the\nreal world.\n\n - Andrew Straw \n\n.. _discussion: https://mail.enthought.com/pipermail/enthought-dev/2008-October/018545.html\n.. _Traits: http://code.enthought.com/projects/traits/\n.. _Pyro: http://pyro.sourceforge.net/\n\nQuickstart\n----------\n\nTo run the demo, run this in one terminal::\n\n # Start the \"do\" program -- Alice in the motivation above\n python wx_demo.py do\n\nAnd run this in another terminal::\n\n # Start the \"view\" program -- Bob in the motivation above\n python wx_demo.py view\n\nLicense\n-------\n\nThis code licensed with the MIT license (see the source code for the\nfull license).\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/astraw/remote_traits", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "remote_traits", "package_url": "https://pypi.org/project/remote_traits/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/remote_traits/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/astraw/remote_traits" }, "release_url": "https://pypi.org/project/remote_traits/0.1/", "requires_dist": null, "requires_python": null, "summary": "use traits remotely", "version": "0.1" }, "last_serial": 798770, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c22654806203b4554a465d8f46322e0c", "sha256": "03888853b7e8022d27602f0c640216895c8e39d3c721268442f6ad8bab513846" }, "downloads": -1, "filename": "remote_traits-0.1.tar.gz", "has_sig": false, "md5_digest": "c22654806203b4554a465d8f46322e0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5388, "upload_time": "2012-06-01T11:40:37", "url": "https://files.pythonhosted.org/packages/12/f9/293eb1b2fab714377b1db2520467fc8e91a9b7bfe86dd985c759497415df/remote_traits-0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "b8cc150206f898ad9d5de20279cf6c53", "sha256": "057a395ad3549acbf56b13b5b609d528ff26c910caf47fe462a98875cd1bf72c" }, "downloads": -1, "filename": "remote_traits-0.1.zip", "has_sig": false, "md5_digest": "b8cc150206f898ad9d5de20279cf6c53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8098, "upload_time": "2012-06-01T11:40:38", "url": "https://files.pythonhosted.org/packages/70/9b/deac11b1c877339e7740acfa4f51da1e05b30fd426217ba13bf938cd73c9/remote_traits-0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c22654806203b4554a465d8f46322e0c", "sha256": "03888853b7e8022d27602f0c640216895c8e39d3c721268442f6ad8bab513846" }, "downloads": -1, "filename": "remote_traits-0.1.tar.gz", "has_sig": false, "md5_digest": "c22654806203b4554a465d8f46322e0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5388, "upload_time": "2012-06-01T11:40:37", "url": "https://files.pythonhosted.org/packages/12/f9/293eb1b2fab714377b1db2520467fc8e91a9b7bfe86dd985c759497415df/remote_traits-0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "b8cc150206f898ad9d5de20279cf6c53", "sha256": "057a395ad3549acbf56b13b5b609d528ff26c910caf47fe462a98875cd1bf72c" }, "downloads": -1, "filename": "remote_traits-0.1.zip", "has_sig": false, "md5_digest": "b8cc150206f898ad9d5de20279cf6c53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8098, "upload_time": "2012-06-01T11:40:38", "url": "https://files.pythonhosted.org/packages/70/9b/deac11b1c877339e7740acfa4f51da1e05b30fd426217ba13bf938cd73c9/remote_traits-0.1.zip" } ] }