cgi - Python, who is calling my python module -
I have a Python module which can be asked by CGI script (by giving information from a form) or command line (it Pass options and arguments from the command line). What is a method of installing if the module is called from CGI script or from the command line ??
This will:
import os if os.environment.has_key ('REQUEST_METHOD'): # You are running as a CGI script Else: # You are running from the command line
Comments
Post a Comment