基础组件
发布历史
0.0.1 初始版
安装
pip install co6co_win
from pathlib import Path
class WinserviceDemo(Winservice):
_svc_name_ = "pythonService"
_svc_display_name_ = "pythonService"
_svc_description_ = "pythonService"
# _exe_name_ = "C:\\Users\\Administrator\\envs\\win32\\pythonservice.exe"
def start(self):
self.isrunning = True
def stop(self):
self.isrunning = False
def main(self):
"""
执行自己的代码
"""
i = 0
while self.isrunning:
random.seed()
x = random.randint(1, 1000000)
Path(f"C:/{x}.txt").touch()
time.sleep(5)
Path(f'c:/1.txt').touch()
# 调用方法
if __name__ == '__main__':
WinserviceDemo.parse_command_line()
Release files for co6co-win 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| co6co_win-0.0.1.tar.gz | 2.8 kB | Details |
Release files / co6co_win-0.0.1.tar.gz
| Download URL | co6co_win-0.0.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
892b5a96a0e8e307427cfddbcee5272fb6aec7a41046562c96cbc852d1b96d7c
|
|
BLAKE2b-256 checksum How to use checksums |
dddb36b1e0546a135f3c4893c6541330c2a7f2c488c315261bc6070b0ccce1e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.4
|