input the following command:
wgz@wgz:/tmp/test$ python3 -m http.server --bind localhost --cgi
file cgi.html
<form action='cgi-bin/cgi_test.py' method='post'>
<p>Username</p>
<p><input type='text'></p>
<p><input type='submit' value='Login'></p>
file cgi_test.py
#! /usr/bin/env python3
print('Content-type: text/html\n')
print('hello world')