Query on the result returned by python popen get command

problem description

get the results returned by system command execution through popen, but encountered some command execution failures in the process. Instead of returning to the py variable as expected, the output is printed directly. The following example is accompanied by the execution result

.

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

< H1 >! / usr/bin/python < / H1 >

import os
t = os.popen ("dir"). Read ()

t = os.popen ("wjwdidjiwwdhijiwd"). Read ()
exit (1)

what result do you expect? What is the error message actually seen?

python test.py
expect nothing, but actually see
sh: wjwdidjiwwdhijiwd: command not found

excuse me, why is this?

has been resolved, although it is an error, but in fact there is no output. no, no, no.

Apr.06,2021

import os
t = os.popen("dir").read() -sharp linuxdirls
print(t) -sharp
t = os.popen("wjwdidjiwwdhijiwd").read()
exit(1)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ea02-347db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ea02-347db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?