Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

limit python script just run a single process

Project Description

README

SETUP

pip install -U single_process

USE

Limit python script just run a single process, support python3

Use only need to directly import single_process.init module (no need for any function call)

import single_process.init

Of course, you can also manually call the single_process function

from single_process import single_process

single_process()

def main():
    from time import sleep
    sleep(6000)

if __name__ == "__main__":
    main()

中文说明

安装

pip install -U single_process

使用

限制一个python脚本只运行一个进程,支持python3 使用只需要直接 import single_process.init 模块(不需要任何函数调用)

import single_process.init

当然,你也可以手工调用 single_process 函数

from single_process import single_process

single_process()

def main():
    from time import sleep
    sleep(6000)

if __name__ == "__main__":
    main()
Release History

Release History

This version
History Node

2.4.1

History Node

1.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
single_process-2.4.1.tar.gz (2.4 kB) Copy SHA256 Checksum SHA256 Source Aug 21, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting