Integrating HTML with Python

Tirth Patel
2 min readAug 30, 2020

--

Created a WebApp that can execute command of RedHat Operating System.

Created a html document that accepts the client input and store in some variable. The data is transferred by HTTP protocol to the python code in the cgi-bin folder.

HTML form that accepts client input

y = FieldStorage() → This function gets all the value which is stored in the form’s attribute.

y.getvalue(parameter) → This function retrieves the particular value from the form attribute/variable.

Redhat OS control program
HTML Webpage

When clicking on submit the page redirects to the oscontrol.py program of cgi. The command is run at the server side and the output is shown at the client’s browser.

date command run at server and output at client’s browser

--

--

No responses yet