i follow the python guide to write a html and cgi script as follow in pyCharm on a macbook,however,i got 404 error after i click submit
the html
the html
Output:<html>
<title>Interactive Page</title>
<body>
<form method=POST action="cgi-bin/cgi101.py">
<P><B>Enter your name:</B>
<P><input type=text name=user>
<P><input type=submit>
</form>
</body></html>
the cgi script#!/usr/bin/python import cgi form = cgi.FieldStorage() print('Content-type: text/html\n') print('<title>Reply Page</title>') if not 'user' in form: print('<h1>Who are you?</h1>') else: print('<h1>Hello <i>%s,</i>!</h1>' % cgi.escape(form['user'].value))