{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "Introduction\n============\n\n``SystemEvent`` provides a simple synchronization primitive for use across multiple\nprocesses. The ``SystemEvent`` object emulates the ``threading.Event`` API exactly. In\naddition, simple scripts (``evt_set``, ``evt_wait``, and ``evt_clear``) are installed for\neasy usage from shell scripts.\n\nThe main reason to use ``SystemEvent`` is in situations when you want processes to wait\non other processes without the need for polling.\n\nInstallation\n============\n\n``pip install SystemEvent``\n\nUsage\n=====\n\n``SystemEvent`` uses named posix semaphores under the hood, so you need to choose event\nnames that are unique to your application. Any event references will use this unique name.\n\n>From Python, use it *exactly* like you would use a ``threading.Event`` instances, with the\nmain difference being that you need to give your event a name so that other processes can\nreference it.\n\nFor example, in as many consoles as you like, set up an event and have it wait (the last\nline will block on each ```wait()`` call):\n\n >>> import SystemEvent\n >>> evt = SystemEvent.SystemEvent(\"my_event\")\n >>> evt.wait()\n\nAlternatively, you can just run ``evt_wait my_event`` from your favorite shell (this is\njust a small script that does the above almost exactly).\n\nIn another console, set the event and note that the first event releases:\n\n >>> import SystemEvent\n >>> evt = SystemEvent.SystemEvent(\"my_event\")\n >>> evt.set()\n\nAll events blocking on \"my_event\" will be immediately released by this ``set()`` call.\nSubsequent calls to ``evt.wait()`` from any process will not block, since the event is now\nglobally latched.\n\nTo clear the event (so that calls to ``evt.wait()`` will block again), call\n``evt.clear()``.\n\nAs with ``threading.Event`` (and ``multiprocessing.Event``) there is also an ``isSet()``\nmethod which tells you the current state (but watch out for race conditions when checking\nit).\n\nShell scripts\n=============\n\nThree shell scripts are provided, with the following usage:\n\n evt_wait [timeout_s]\n\n evt_set \n\n evt_clear \n\nThese scripts are thin shells over ``SystemEvent`` usage. The ``timeout_s`` option on\n``evt_wait`` is optional, and defaults to infinity.\n\nAll scripts have an exit code of 0, unless ``evt_wait`` times out, in which case it\nreturns 1.\n\nHow does it work?\n=================\n\n``SystemEvent`` currently uses a posix semaphore internally. To integrate with other\nnon-python applications, you can just access the same named semaphore. Just be careful\nthat you increment and decrement correctly. Check out the code for details... it is\nridiculously small.\n\nLicense\n=======\nMIT. See ``LICENSE`` file.\n\nTODO\n====\n\n1. Add tests\n2. Make it work in Windows, too\n3. Remove the ``posix_ipc`` requirement\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "SystemEvent", "package_url": "https://pypi.org/project/SystemEvent/", "platform": "", "project_url": "https://pypi.org/project/SystemEvent/", "project_urls": null, "release_url": "https://pypi.org/project/SystemEvent/1.0.1/", "requires_dist": [ "posix-ipc (>=1.0.0)" ], "requires_python": "", "summary": "System-wide Event synchonization for posix (emulating the threading.Event api)", "version": "1.0.1" }, "last_serial": 3515318, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "9a0154f5ca9031d01d6a91842b699c83", "sha256": "e53de3854f22cba97a55ed7e37d1e00e47a39e1d7e1ed94f2b950571b10fab61" }, "downloads": -1, "filename": "SystemEvent-0.9.0-py2-none-any.whl", "has_sig": false, "md5_digest": "9a0154f5ca9031d01d6a91842b699c83", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6585, "upload_time": "2018-01-23T19:20:10", "url": "https://files.pythonhosted.org/packages/b5/90/1cd00f36450ee08cdda276cea0239772f69b97fa910bdc484045bb05ae08/SystemEvent-0.9.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1db06679391bd210c6a0c0d21931955", "sha256": "9f66217817c86c9f113525c287e912b0d7baf6a4c6b584657a6ea7dfa0d9043d" }, "downloads": -1, "filename": "SystemEvent-0.9.0.tar.gz", "has_sig": false, "md5_digest": "e1db06679391bd210c6a0c0d21931955", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3629, "upload_time": "2017-05-25T03:03:18", "url": "https://files.pythonhosted.org/packages/03/e1/c87d528b85a6a79f1988bcbc06053275c5d6f064595fed872d9e8fa5ef4a/SystemEvent-0.9.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "10006086b63f1b0ba2a5c4a85f501d82", "sha256": "fe70622cb85d6c5a533e5f699c29f96e7a5c67ff51e4617df0d98332918693a5" }, "downloads": -1, "filename": "SystemEvent-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "10006086b63f1b0ba2a5c4a85f501d82", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6581, "upload_time": "2018-01-23T19:20:11", "url": "https://files.pythonhosted.org/packages/d5/3d/ab835cbc1072e91cd469551020bce59c03e3550807eaee1649e17919ee0d/SystemEvent-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a64fc54519ed65bc5672c7477f86e274", "sha256": "7eadd21afcf177754ede00c20002779fdcdb69d71a13cfc0abe7cfcd242e17fe" }, "downloads": -1, "filename": "SystemEvent-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a64fc54519ed65bc5672c7477f86e274", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3693, "upload_time": "2018-01-23T19:21:14", "url": "https://files.pythonhosted.org/packages/b1/62/1f6c9eddf1b20f7919511ee7c44195e7513ec85ba85689f53b6514815387/SystemEvent-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4955e340d81527d969fccdcd31aa283d", "sha256": "2b670144a480fac3f7d0ad1112109efb30d6dacf2ed95f06536c675b0309e84c" }, "downloads": -1, "filename": "SystemEvent-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "4955e340d81527d969fccdcd31aa283d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6750, "upload_time": "2018-01-23T21:08:34", "url": "https://files.pythonhosted.org/packages/05/e1/f174dfbcab4cf61a21d520c8d1d8f8a5326754a572596c72d3a94647c472/SystemEvent-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ebd93aacde7e1177ecfae861b9dd54bd", "sha256": "c1240745a26083506f989a7a1bb60aae9636909669603dd0d259a4fc8d2e45c6" }, "downloads": -1, "filename": "SystemEvent-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ebd93aacde7e1177ecfae861b9dd54bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3858, "upload_time": "2018-01-23T21:08:35", "url": "https://files.pythonhosted.org/packages/b8/e7/1be6904240974fa79bf6d6b1e7927bebbdb119de3cc5b1d010b5bdbd447b/SystemEvent-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4955e340d81527d969fccdcd31aa283d", "sha256": "2b670144a480fac3f7d0ad1112109efb30d6dacf2ed95f06536c675b0309e84c" }, "downloads": -1, "filename": "SystemEvent-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "4955e340d81527d969fccdcd31aa283d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6750, "upload_time": "2018-01-23T21:08:34", "url": "https://files.pythonhosted.org/packages/05/e1/f174dfbcab4cf61a21d520c8d1d8f8a5326754a572596c72d3a94647c472/SystemEvent-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ebd93aacde7e1177ecfae861b9dd54bd", "sha256": "c1240745a26083506f989a7a1bb60aae9636909669603dd0d259a4fc8d2e45c6" }, "downloads": -1, "filename": "SystemEvent-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ebd93aacde7e1177ecfae861b9dd54bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3858, "upload_time": "2018-01-23T21:08:35", "url": "https://files.pythonhosted.org/packages/b8/e7/1be6904240974fa79bf6d6b1e7927bebbdb119de3cc5b1d010b5bdbd447b/SystemEvent-1.0.1.tar.gz" } ] }