开发者

How to initiate python program with a change in the input?

I have an开发者_如何学C application made in python, this application takes input from a separate text file called input.txt, i have to design the application in such a way that application runs automatically with any input to input.txt. Such that i need not go to command prompt and run the program, if i give the input, or change the text present in input.txt, python program should start execute automatically.

Please help me out with this :)

Thank you :) :)


You can run your program once and watch the filesystem changes for new or modified file. Try using python-inotify for linux:

https://github.com/seb-m/pyinotify

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜