[Tutor] "List" object is not callable

Jason N. nymcity at yahoo.com
Sat Apr 30 14:51:17 EDT 2016


Hello,
I found this simple script online but when I execute it I get the following error: "TypeError: 'list' object is not callable"
Here is the code sample:import subprocess

ls_output= subprocess.check_output(['dir'])
I searched online and found a another similar code sample (http://www.opentechguides.com/how-to/article/python/57/python-ping-subnet.html) but when I run it on my system I get the same error.Any feedback is very much appreciated.  Thank you.


More information about the Tutor mailing list