Thursday, December 12, 2013

Python - Compiling Python code from py to pyc

Although Python script does not need to be explicitly compiled before running them, it is possible to manually compile them into bytes code (.pyc) from the script (.py) for better efficiency.

You can read http://effbot.org/pyfaq/how-do-i-create-a-pyc-file.htm to know more about compiling a Python code from py to pyc

Or, you can use the following command to compile a Python source file.

python -c "import py_compile; py_compile.compile('test.py', 'test.pyc')"



No comments:

Post a Comment

Bootstrap Validator - Submit button remain disabled even when form is valid

If you work with Boostrap Validator (http://1000hz.github.io/bootstrap-validator/), you may experience an issue when your entire form is ...