+ 15

What is the sys module ?

What is it used for? and can it be used on the SLCP(sololearn code playground)

21st Jul 2018, 5:05 PM
LONGTIE👔
LONGTIE👔 - avatar
6 Respostas
+ 6
From Google. sys — System-specific parameters and functions. This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available. ... A tuple of strings giving the names of all modules that are compiled into this Python interpreter.
22nd Jul 2018, 2:56 AM
Maninder $ingh
Maninder $ingh - avatar
+ 15
Well the sys module allows user to use stdin() and stdout(), as well as stderr(), but we can also utilize sys.argv(). It is pretty simple and very useful once you learn it. The idea of sys.argv is to allow you to pass arguments through to Python from the command line.
23rd Jul 2018, 8:21 AM
Shaif Jwd
Shaif Jwd - avatar
+ 5
Try this code: import sys If it works without errors (and it does) you can use it. More information can be found here: https://docs.python.org/3/library/sys.html
21st Jul 2018, 6:03 PM
Paul
Paul - avatar
21st Jul 2018, 8:15 PM
Nicolass22
Nicolass22 - avatar
+ 2
import sys and import os
22nd Jul 2018, 7:22 PM
đŸ…żïžÂźïžâ­•ïž_e✖e
đŸ…żïžÂźïžâ­•ïž_e✖e - avatar
+ 2
whenever you want to find more about a certain module just import it, and then call dir() and help(). python -c "import sys; dir(sys);help(sys)"
24th Jul 2018, 11:13 PM
dejanualex
dejanualex - avatar