初めに Pythonのスクリプトを書いていて、常駐化させたい時があります。 *nix系だとpython-daemon 1.5.5 : Python Package Indexを使って実現できるようですが、 Windowsのサービスは探してもあまり情報が見当たらないので腹を据えて調べてみました。 なんだかんだでwin32APIの知識が必要になって割と骨だったのですが、 ある程度動くものができたので、公開します。 [注意] 私はwin32APIの知識が足りません。おかしなところがあればご指摘をお願いします。 参考 python でWindowsサービス作成 [Python-ml-jp 4292] Re: Windowsサービスを作る方法は? Python win32 service - Stack Overflow Python Windows Service | DaniWeb Win32A
![pythonでのWindowsサービスの書き方 - Keep on moving](https://cdn-ak-scissors.b.st-hatena.com/image/square/319ca1c009e1322a187e25c26671c6479244d6a1/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2FE%2FEhren%2F20110511%2F20110511175342.jpg)