Calling a python web server within a script
I would break it apart further:

script A, on port a
script B, on port b
web script C which checks on A and B (by making simple requests to them)
 and returns the results in a machine-friendly format, ie JSON or XML
web page D which calls C and formats the results for people, ie an HTML table

There are existing programs which do this - Nagios springs to mind.
I would like to have a web server displaying the status of 2 of my python scripts.
These scripts listen for incoming data on a specific port.  What I would like to do is have it so that when the script is running the web server will return a HTTP200 and when the script is not running a 500.  I have had a look at cherrypy and other such python web servers but I could not get them to run first and then while the web server is running continue with the rest of my code.  I would like it so that if the script crashes so does the web server.  Or a way for the web server to display say a blank webpage with just a 1 in the HTML if the script is running or a 0 if it is not.
Any suggestions?
Thanks in advance.