python-Module-sys

Source: Internet
Author: User

sys.argv command line argument list, the first element is the program itself path Sys.exit (n) exits the program, exit normally exits (0) Sys.version Gets the version information of the Python interpreter SYS.M Axint the largest int value Sys.path returns the search path for the module, initialized with the value of the PYTHONPATH environment variable Sys.platform returns the operating system platform name Sys.stdout.write ('Please :')#standard output, the example of a progress bar, note, in the PY3, you can use print insteadval = Sys.stdin.readline () [:-1]#Standard inputSys.getrecursionlimit ()#get maximum number of recursive layersSys.setrecursionlimit (1200)#set maximum number of recursive layersSys.getdefaultencoding ()#Get interpreter default encodingSys.getfilesystemencoding#get the default encoding for memory data stored in a file

Import Sys

>>>sys.argv["']>>>sys.version'3.6.4 | Anaconda, inc.| (Default, Jan 16 2018, 10:22:32) [MSC v.1900 bit (AMD64)]'>>>sys.maxsize9223372036854775807>>>sys.path["','E:\\anaconda3\\python36.zip','E:\\anaconda3\\dlls','E:\\anaconda3\\lib','E:\\anaconda3','e:\\anaconda3\\lib\\site-packages','E:\\anaconda3\\lib\\site-packages\\win32','E:\\anaconda3\\lib\\site-packages\\win32\\lib','E:\\anaconda3\\lib\\site-packages\\pythonwin']>>>Sys.platform'Win32'>>>Sys.stdout<_io. Textiowrapper name='<stdout>'Mode='W'encoding='Utf-8'>>>> Sys.stdout.write ('Hey3') Hey34>>> Sys.stdout.write ('HEY3SDF') Hey3sdf7#This is the standard output .

python-Module-sys

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.