{"id":37619645,"url":"https://github.com/jamesabel/pressenter2exit","last_synced_at":"2026-01-16T10:37:00.692Z","repository":{"id":57454652,"uuid":"105344174","full_name":"jamesabel/pressenter2exit","owner":"jamesabel","description":"Facilitates exit of a Python CLI or GUI program in a controlled way","archived":false,"fork":false,"pushed_at":"2024-03-03T22:46:22.000Z","size":45,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T02:24:34.190Z","etag":null,"topics":["cli","gui","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesabel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-30T05:27:00.000Z","updated_at":"2022-06-08T04:17:48.000Z","dependencies_parsed_at":"2022-09-05T05:41:01.479Z","dependency_job_id":null,"html_url":"https://github.com/jamesabel/pressenter2exit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamesabel/pressenter2exit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesabel%2Fpressenter2exit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesabel%2Fpressenter2exit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesabel%2Fpressenter2exit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesabel%2Fpressenter2exit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesabel","download_url":"https://codeload.github.com/jamesabel/pressenter2exit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesabel%2Fpressenter2exit/sbom","scorecard":{"id":503581,"data":{"date":"2025-08-11","repo":{"name":"github.com/jamesabel/pressenter2exit","commit":"24c62d29de8bed176af671eff1119c69eae69fdb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T22:40:00.976Z","repository_id":57454652,"created_at":"2025-08-19T22:40:00.977Z","updated_at":"2025-08-19T22:40:00.977Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gui","python"],"created_at":"2026-01-16T10:37:00.618Z","updated_at":"2026-01-16T10:37:00.682Z","avatar_url":"https://github.com/jamesabel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pressenter2exit (Press Enter To Exit) #\n\npressenter2exit (\"Press Enter To Exit\") facilitates long-running CLI or GUI programs to \nexit in clean and controlled way.\n\n# The Problem #\n\nLong running programs can be useful, but there is often a need to exit them in a clean \nmanner (as opposed to, for example, pressing ctrl-c).\n\n## Examples ##\n\n- Programs that 'crunch' on a large number of input data sets, but you want to be able \nto cleanly interrupt the program after it's done with the current data set.\n- Programs that run in an 'infinite loop' waiting for some sort of input data to appear.  You'd \nlike to be able to exit the 'infinite loop' in a controlled way.\n- Long-running system tests where you want to run, say, overnight but when you return you \nwant to exit in a controlled way so you can get proper status and statistics (as \nopposed to ctrl-c).\n\nThe benefit to exiting in a controlled way is that you don't end up with a data set \npartially processed, in an unknown state, and/or be unable to output statistics from the run. By \nusing pressenter2exit, processing that has been done so far can be useful and not merely \nthrown away, which can happen if a program is forcefully and immediately aborted.\n\n## Example Code ##\n\n```python\n\nfrom time import time\n\nfrom pressenter2exit import PressEnter2Exit\n\nexit_control = PressEnter2Exit()\n\nstart_time = time()\n# loops until enter is pressed or we reach the end of our run time\nwhile exit_control.is_alive() and time() - start_time \u003c 20.0:\n    print(\"I've been waiting for %f seconds.\" % (time() - start_time))\n    exit_control.join(4.0)  # use join() instead of time.sleep() to ensure an immediate exit\nprint('Done! Exiting after %f seconds.' % (time() - start_time))\n\n\n```\n\nOutput when enter is pressed mid-run:\n\n```\nPress enter to exit:\nI've been waiting for 0.000005 seconds.\nI've been waiting for 4.000108 seconds.\nDone! Exiting after 5.331482 seconds.\n```\n\nOutput when the program is allowed to finish on its own:\n\n```\nPress enter to exit:\nI've been waiting for 0.000006 seconds.\nI've been waiting for 4.004918 seconds.\nI've been waiting for 8.007299 seconds.\nI've been waiting for 12.009813 seconds.\nI've been waiting for 16.012574 seconds.\nDone! Exiting after 20.016182 seconds.\n```\n\n## Multiprocessing ##\n\nUse `PressEnter2ExitGUI` for programs that use multiprocessing (e.g. create processes).  Since Python \nblocks all processes on `stdin` input, the GUI version must be used.\n\n## Platform Support ##\n\npressenter2exit doesn't use any platform specific libraries, so it should run on any platform that \nsupports the CLI (e.g. Windows, MacOS, Linux, etc.).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesabel%2Fpressenter2exit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesabel%2Fpressenter2exit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesabel%2Fpressenter2exit/lists"}