I have some python code which runs every 10 minutes or so. It reads in data, does some processing and produces an output. I'd like to change this so the it runs continuously.
Is python well suited for running as a server (asin running continuously) or would I be better off converting my application to use c++? If I leave it in python, are there any modules you would reccomend for achieving this?
Thanks
-
1Have you looked at Google App Engine? It supports python in the back end and requires only minimal set up on your side.Abhranil Das– Abhranil Das2012年05月05日 09:45:16 +00:00Commented May 5, 2012 at 9:45
2 Answers 2
Yes it is if you don't need performance server side or if your application is I/O bound. Youtube is full python server side.
A good library to start with is simply the socketserver module from the standard library
http://docs.python.org/library/socketserver.html#socketserver-tcpserver-example
1 Comment
Python can use as a server application. I can remember many web and ftp servers written in python. See in threading library for threads.