I started the server using python -m SimpleHTTPServer
I am a complete beginner to web development and was using Python SimpleHTTPServer 2.7 in ubuntu. While trying to shutdown the server, ctl + c
gives me a traceback complaining about being interrupted.
After looking at threads:
1. How do I shut down a python simpleHTTPserver?
2. Shutdown socketserver serve_forever() in one-thread Python application
3. Shutting down an HTTPServer
I can understand that it is possible to properly (or gracefully) shutdown the server. But as I am a newbie I am not able to actually do it.
P.S.: In the 3rd link above. There is also a code to "I think gracefully shutdown the SimpleHTTPServer". But I am also not able to understand - how to run that code?
Please Help
Thank You in advance