[Python] compiles python py files into confidential pyc files,

Source: Internet
Author: User

[Python] compiles python py files into confidential pyc files,

 

Because the python program's py file can easily leak source code, python can be compiled into a confidential pyc file.


Python's pyc file is a binary file. After the py file is changed to a pyc file, the loading speed is improved, and pyc is a cross-platform bytecode, it is executed by a python virtual machine, which is similar to JAVA or. NET Virtual Machine Concept.


To compile a py file to a pyc file:

Enter python-m py_compile myFile. py in the command line to generate the corresponding pyc file.


Hope to help you.


Bytes ------------------------------------------------------------------------------------------------------------



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.