I am trying to print to the standard output without using the sys
module or the print()
function. Is there any way to do that?
Trying to print to stdout without sys.stdout.write() and print()
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
As a funny exercise, yes you can easily do that. Open
stdout
as a file and write. But how do you know which file to open? As a matter of fact, at least on UNIX systems and alike, the file descriptors 0, 1, and 2 correspond to stdin, stdout, stderr.