sys
is a built-in module in Python that provides access to system-specific parameters and functions. It allows you to interact with the Python runtime environment. Here's some key information:
sys.argv
is a list containing the command-line arguments passed to the Python script. sys.argv[0]
is the script's name.sys.path
is a list of strings that specifies the search path for modules. You can modify this list to add directories where Python should look for modules.sys.version
provides the Python version string, and sys.version_info
returns a tuple containing the version number components.sys.stdin
, sys.stdout
, and sys.stderr
are file-like objects representing the standard input, standard output, and standard error streams, respectively.sys.exit()
allows you to exit the Python interpreter with a specified exit code.sys.platform
provides a string identifying the operating system platform.sys.getrecursionlimit()
and sys.setrecursionlimit()
.sys.executable
provides the absolute path of the Python executable binary.sys.byteorder
indicates the native byte order (endianness) of the platform. It can be 'little'
or 'big'
.Ne Demek sitesindeki bilgiler kullanıcılar vasıtasıyla veya otomatik oluşturulmuştur. Buradaki bilgilerin doğru olduğu garanti edilmez. Düzeltilmesi gereken bilgi olduğunu düşünüyorsanız bizimle iletişime geçiniz. Her türlü görüş, destek ve önerileriniz için iletisim@nedemek.page