Skip to main content

基础组件

发布历史

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()

Metadata

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)

Source distribution for co6co-win 0.0.1
File Size Uploaded Provenance Actions
co6co_win-0.0.1.tar.gz 2.8 kB Without provenance Details for co6co_win-0.0.1.tar.gz

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

Security for co6co-win 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page