The python sys module contains functions related to the python interpreter and its environment. You can use dir (sys) to view the methods and member attributes in the interpreter.
Copy codeThe Code is as follows:Import sysPrint dir
ArticleDirectory
1. byte-compiled. PyC File
2. From... import... statement
3. The _ name _ attribute of the module
4. Create your own modules
5. dir () function
6. Packages)
VII. module:
You can write functions to reuse
Python source code analysis Note 3-Python execution PrinciplePython source code analysis Note 3-Python execution Principle
The book address: http://www.jianshu.com/p/03af86845c95
I have written several source code analysis notes before. However,
Compiled vs explanatory typeCompiled typePros: Compilers typically have pre-compiled procedures to optimize code. Because the compilation is done only once, the runtime does not need to compile, so the program execution of the compiled language is
Compiled vs explanatory typeCompiled typePros: Compilers typically have pre-compiled procedures to optimize code. Because the compilation is done only once, the runtime does not need to compile, so the program execution of the compiled language is
1. A simple exampleLet's start with a simple example that contains two files foo.py and demo.py[foo.py]def add (A, B):Return a + b[demo.py]Import FooA = [1, ' Python ']A = ' A string 'def func ():A = 1b = 257Print (A + B)Print (a)if __name__ = = ' __
TODO: Execute Python script
System.out.println ("Start Python");
Parameters to be passed
String a = "AAA", B = "BBB", C = "CCC", D = "ddd";
System.out.println ("start;;;" + a);
Set command
In boost. Python, python is embedded in the C ++ section, and Chinese documents found on the Internet seem to be outdated,
Such as boost. Python Study Notes http://edyfox.codecarver.org/html/boost_python.html
InBoost. Python version 2To provide
Introduction to Python:First, what is PythonPython (United Kingdom pronunciation:/paθn/American pronunciation:/paθɑn/), is an object-oriented, literal translation of computer programming language.Each language has its own philosophy:Pythonde design
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.