New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

console-ctrl

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-ctrl

Send CTRL-C event to a target console process WITHOUT causing KeyboardInterrput at the caller side.

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
1

Console CTRL

This simple package allows you to send CTRL-C event to a target console process WITHOUT causing KeyboardInterrput at the caller side.

The solution is based on posts shared on stackoverflow (see Reference for details).

Usage

Install with pip install console-ctrl

In you code:

import console_ctrl
import subprocess

# Start some command IN A SEPARATE CONSOLE
p = subprocess.Popen(['some_command'], creationflags=subprocess.CREATE_NEW_CONSOLE)
# Do something else

console_ctrl.send_ctrl_c(p.pid)

Note: the target process should be started with creationflags=subprocess.CREATE_NEW_CONSOLE.

Reference

Specially thanks to people shared solutions here:

More official docs:

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc