Q:

Byte Code File for Python

I am unable to see Compiled Python File (Byte Code) on my hard drive.
I can only see script file with py extension but no Compiled file with pyc extension
I have Windows 7 OS installed.

A:

Only imported modules get a byte-code cache, a .pyc file. For the main script file, the one you run first, no byte cache file is created.
Bytecode cache files are only created if Python has write access to the file system.
For Python 3.2 newer, these bytecode files have been moved to a subdirectory called __pycache__, see PEP 3147.
If you do not see a .pyc file for your python code, check that you:

you are dealing with a module, not the main script.
Python has write access to the filesystem
for Python 3.2 or newer, that you didn't miss out on the __pycache__ directory
that you didn't run Python with the -B command line switch disabling bytecode cache writing. 

