In this post, I will give you an example to demonstrates how to generate a .pyc from compiling a python program.
What is the .pyc? A .pyc file is a compiled python bytecode file, you can visit how do I create a pyc file for more information.
Fist, I write a python script named hello.py as following:
Then use chmod command to change its file privilege.
Now, edit a python script as pycoder.py.
Then, do the same thing as hello.py.
At last, please run pycoder.py script, and a pyc bytecode hello.pyc is generated.
Enter Your File Name: hello.py .pyc of the python script hello.py is generated.