Test.py is not reflected on the web server in Python3.

I'm new to programming.

I'm trying to reflect the python code in the local environment, but the python source code is reflected as it is.

$ python3 -m http.server 8000

After typing

http://localhost:8000/cgi-bin/

It is reflected when you connect to.

However

http://localhost:8000/cgi-bin/test.py

As soon as I try to migrate to, it is not reflected in html and the code of test.py is displayed as it is.

I would appreciate it if you could give me a solution. I look forward to working with you.

Recommended Posts

Test.py is not reflected on the web server in Python3.
Solve the problem that CSS is not reflected during web application development in Flask
Hit the web API in Python
The image is displayed in the local development environment, but the image is not displayed on the remote server of VPS
How is the progress? Let's get on with the boom ?? in Python
Build Python environment on Ubuntu (when pip is not the default)
Start the web server in the current directory
The one who is not on DVD
What is "mahjong" in the Python library? ??
Download files on the web with Python
Publish the current directory on the web server
Run the output code on the local web server as "A, pretending to be B" in python
Deploy and use the prediction model created in Python on SQL Server
Run the task in the background on the sshed server
Pipfile is not created in the current directory
What is wheezy in the Docker Python image?
About the difference between "==" and "is" in python
In Python, change the behavior of the method depending on how it is called
DNS server in Python ....
Check if the string is a number in python
Until the web application is released on Sakura VPS
When the selected object in bpy.context.selected_objects is not returned
Find the part that is 575 from Wikipedia in Python
Not being aware of the contents of the data in python
Run CGI written in python on Sakura's rental server
Write a log-scale histogram on the x-axis in python
Execute the command on the web server and display the result
Install django on python + anaconda and start the server
[Python3] Take a screenshot of a web page on the server and crop it further
Hello World is a simple web server that follows WSGI (Web Server Gateway Interface) in Python.
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows
I tried studying on the WEB server side at an in-house Python study session
Python round is not strictly round
Differences in sys.path depending on how Python is started (v3.8.2)
Display "Hello World" created in the local environment on the web
Web scraping notes in python3
Download the file in Python
Find the difference in Python
The story that `while queue` did not work in python
Access the host SQL Server with python27 / pyodbc on the container
Python list is not a list
Don't make test.py in Python!
Automatically get the port where Arduino is stuck in Python
Image Optimize on the server side using TinyPNG's Web API
[Python beginner] Variables and scope inside the function (when the processing inside the function is reflected outside the function and when it is not reflected)
If you want Python completion in VS Code, Microsoft Python Language Server is the best story
Save images on the web to Drive with Python (Colab)
Workaround for the problem that sys.argv is not passed when executing a Python script with only the file name in Python2.7 on Windows
Play a sound in Python assuming that the keyboard is a piano keyboard
New Python grammar and features not mentioned in the introductory book
Delete a particular character in Python if it is the last
How to judge that the cross key is input in Python3
How to use the asterisk (*) in Python. Maybe this is all? ..
Hit the New Relic API in Python to get the server status
[Python] The value written in Openpyxl is displayed in exponential notation (E).
[Golang] "package exec is not in GOROOT" when executing the test
The story that 2D list replacement did not work in python
Settings until the Dango project is started on the server with Pycharm
[Python] Do not put Japanese in the path used by OpenCV
What to do when the value type is ambiguous in Python?