Linked Questions

Popular Questions

Calling function os.popen() gives unexpected return object

Asked by At

I am using os.popen() to call some argument. When I call the argument itself in terminal it works perfectly and I get the expected return object. But when I call it using the os.popen() I get

os._wrap_close object at 0x7f6ec0d3d1d0>

Code:

    > command = "python -m json.tool \"" + path + video +"-something.json\"| grep \"ext\\\"\"  
    > result = os.popen(command) 
    > print(result)

I find it confusing to get different results, when it should be the same thing

Related Questions