{ "info": { "author": "Jeremy Gillick", "author_email": "none@none.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "Python Pause\n===============\n\nSuspend the execution of your program for a given amount of time. This works similarly to ``time.sleep``, but uses your computers timestamp to track time, versus a counter.\n\nFor example, traditionally using ``time.sleep(3600)``, will pause the program for 60 minutes. If your computer goes into standby mode during minute one, and wakes up several hours later, your program will continue to be paused for 59 minutes.\n\nOn the other hand, with ``pause.seconds(3600)``, if your computer goes into standby mode for several hours, the program will continue immediately after the machine wakes back up since the minimum amount of time has passed since the pause was started.\n\nHow it works\n------------\n\nWhen you create a pause, it will determine what the end time of that pause should be. Then a loop will be started that will continually check the current time against the end time. When the current time is equal or greater than the end time, the method will allow your program can resume.\n\nPrecision\n---------\n\nThe precision *should* be within 0.001 of a second, however, this will depend on how precise your system sleep is and other performance factors.\n\nThis module computes the pause duration between now and the future date, and then sleeps for half of this duration. After this time, it recomputes the new pause duration, repeating this process until the desired time is reached.\n\nInstall\n-------\n\nDownload the source code and run the following command::\n\n sudo python ./setup.py install\n\nOr, without downloading, install with `pip `_::\n\n sudo pip install pause\n\n\nExamples:\n---------\n\nPause for half a second::\n\n import pause\n pause.milliseconds(500)\n\nOr::\n\n import pause\n pause.seconds(0.5)\n\nPause for 1 minute::\n\n import pause\n pause.minutes(1)\n\nPause for 2 days::\n\n import pause\n pause.days(2)\n\nPause until a unix time, with millisecond precision::\n\n import pause\n pause.until(1370640569.7747359)\n\nPause using datetime::\n\n import pause, datetime\n dt = datetime.datetime(2013, 6, 2, 14, 36, 34, 383752)\n pause.until(dt)\n\n\nFunctions\n---------\n\n* days(num)\n Pause for this many days\n\n* hours(num)\n Pause for this many hours\n\n* milliseconds(num)\n Pause for this many milliseconds\n\n* minutes(num)\n Pause for this many minutes\n\n* seconds(num)\n Pause for this many seconds\n\n* time(num)\n Same as PauseFor.seconds()\n\n* until(time)\n Pause your program until a specific end time.\n 'time' is either a unix timestamp in seconds (i.e. seconds since Unix epoch) or datetime object\n\n* weeks(num)\n Pause for this many weeks\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jgillick/python-pause", "keywords": "sleep timestamp datetime", "license": "LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "pause", "package_url": "https://pypi.org/project/pause/", "platform": "osx", "project_url": "https://pypi.org/project/pause/", "project_urls": { "Homepage": "https://github.com/jgillick/python-pause" }, "release_url": "https://pypi.org/project/pause/0.2/", "requires_dist": null, "requires_python": "", "summary": "A timestamp-based sleep function for Python.", "version": "0.2" }, "last_serial": 4417272, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "15070bbe3a9be017c6b4e7e626267f57", "sha256": "f59fc824c3f664b1a1cfe44cf4685cafb627dd8321a33dfc6edd49053cc4d53f" }, "downloads": -1, "filename": "pause-0.1.tar.gz", "has_sig": false, "md5_digest": "15070bbe3a9be017c6b4e7e626267f57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3860, "upload_time": "2013-05-31T22:45:50", "url": "https://files.pythonhosted.org/packages/43/7c/0c9e812380cf49e52d5517dd1138a5936122600edd6dd4fb24dad335ee5a/pause-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "770da5f82ed8a507c9a2b1673255d751", "sha256": "91ebb88d9ea4d305c6c91343fdd7b66720b2d7fdfddeaf1b93145cb213ab1956" }, "downloads": -1, "filename": "pause-0.1.1.tar.gz", "has_sig": false, "md5_digest": "770da5f82ed8a507c9a2b1673255d751", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3980, "upload_time": "2013-05-31T23:00:13", "url": "https://files.pythonhosted.org/packages/82/53/8ec17d2cf81382f0732fa7ef8dc57d2bd8df37d7b6ae6c666374c15ba2b3/pause-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3102adc238d0d4a221de60febdec6af2", "sha256": "8874e6a3d73c8c540b062defc91bc6929c765e2283803f124a365826da846eaa" }, "downloads": -1, "filename": "pause-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3102adc238d0d4a221de60febdec6af2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3412, "upload_time": "2013-06-03T19:41:59", "url": "https://files.pythonhosted.org/packages/53/b6/9783ddeebf6280bad07add45ea3e03759b3dc1d7614d38b86fa80010f6bb/pause-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "c40ccf54f65032fc32f49084ef890db6", "sha256": "392e88e09de848def885d83cd6816bf437eb6dc01696dde87d3b80a86e3779b0" }, "downloads": -1, "filename": "pause-0.2.tar.gz", "has_sig": false, "md5_digest": "c40ccf54f65032fc32f49084ef890db6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4173, "upload_time": "2018-10-25T23:59:21", "url": "https://files.pythonhosted.org/packages/c8/46/252ff0ece09fc962b4ed9e723e06710d409804918e30b86114cccad6dc5f/pause-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c40ccf54f65032fc32f49084ef890db6", "sha256": "392e88e09de848def885d83cd6816bf437eb6dc01696dde87d3b80a86e3779b0" }, "downloads": -1, "filename": "pause-0.2.tar.gz", "has_sig": false, "md5_digest": "c40ccf54f65032fc32f49084ef890db6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4173, "upload_time": "2018-10-25T23:59:21", "url": "https://files.pythonhosted.org/packages/c8/46/252ff0ece09fc962b4ed9e723e06710d409804918e30b86114cccad6dc5f/pause-0.2.tar.gz" } ] }