正在创建守护进程

daemonp的Python项目详细描述


正在创建守护进程

daemonpy是用于创建守护进程的包。在

开发于python代码:100%。在

自述文件用于介绍模块并提供有关 如何安装模块,它可能具有的任何机器依赖关系,以及 安装模块前应提供的其他信息。在

Python packageGitHub issues openGitHub contributors

目录

安装

Install Python2 PackageInstall Python3 Package

导航到release page下载并提取版本档案。在

要安装模块,请定位并运行设置.py,键入以下内容:

tar xvzf daemonpy-x.y.z.tar.gz
cd daemonpy-x.y.z
pip install -r requirements.txt

安装lib进程

^{pr2}$

安装lib egg信息

python setup.py install_egg_info
running install_egg_info
running egg_info
creating daemonpy.egg-info
writing requirements to daemonpy.egg-info/requires.txt
writing daemonpy.egg-info/PKG-INFO
writing top-level names to daemonpy.egg-info/top_level.txt
writing dependency_links to daemonpy.egg-info/dependency_links.txt
writing manifest file 'daemonpy.egg-info/SOURCES.txt'
reading manifest file 'daemonpy.egg-info/SOURCES.txt'
writing manifest file 'daemonpy.egg-info/SOURCES.txt'
Copying daemonpy.egg-info to /usr/local/lib/python2.7/dist-packages/daemonpy-1.0.0.egg-info

也可以使用docker创建图像/容器。在

daemonpy docker checker

用法

创建简短示例:

#!/usr/bin/env python""" Module     mydaemon.py Copyright     Copyright (C) 2020 Vladimir Roncevic <elektron.ronca@gmail.com>     mydaemon is free software: you can redistribute it and/or modify it     under the terms of the GNU General Public License as published by the     Free Software Foundation, either version 3 of the License, or     (at your option) any later version.     mydaemon is distributed in the hope that it will be useful, but     WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU General Public License for more details.     You should have received a copy of the GNU General Public License along     with this program. If not, see <http://www.gnu.org/licenses/>. Info     Define class MyDaemon with attribute(s) and method(s).     Set an operation for Daemon process."""importsysfromtimeimportsleeptry:fromdaemonpyimportDaemonexceptImportErroraserror:MESSAGE="\n{0}\n{1}\n".format(__file__,error)sys.exit(MESSAGE)# Force close python ATS ##############################classMyDaemon(Daemon):"""        Define class MyDaemon with attribute(s) and method(s).        Set an operation for Daemon process.        It defines:            :attributes:                | None            :methods:                | run - Run Daemon process (defined method)    """defrun(self):"""            Run Daemon process with time sleep example.            :exceptions: None        """whileTrue:sleep(1)if__name__=="__main__":daemon=MyDaemon('/tmp/daemon-example.pid')daemon.usage(sys.argv)

依赖性

这些模块需要其他模块和库(Python 2.x/3.x):

库结构

daemonpy基于OOP:

库结构:

.
├── daemonpy/
│   └── __init__.py
└── setup.py

文件

Documentation Status

更多文档和信息请访问:

版权和许可

License: GPL v3License

版权所有(C)2020 vroncevic.github.io/daemonpy

daemonpy是免费软件;您可以重新分发和/或修改 它与Python本身的术语相同,要么是Python版本2.x/3.x,要么是, 根据您的选择,您可以使用任何更高版本的python3。在

让我们帮助和支持PSF。在

Python Software Foundation

Donate

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在mongodb中获取用户有权访问的数据库列表?   基于契约和类不变量的java设计   java我的代码有什么问题,似乎是正确的,但事实并非如此   java Android初学者:布局按钮和文本   400错误Paypal令牌API与Java(HttpURLConnection)   为什么Java从socket中随机读取数据,而不是整个消息?   如果我调用scanner,我会扫描两次。先是下一个,然后是扫描仪。下一个   如果消息发送失败,java ActiveMQ/JMS不重试   java有没有类似于dynaTrace的开源框架?   java Android:获取zip中的文件数(使用存储卷/存储访问框架)   java无法将流图像解码为片段   java如何修复Jenkins插件中的“此位置的预期stackmap帧”   java如何使用javac编译器编译AndroidManifest。xml文件?