python - Subprocess.check_output doesn't work -


when use check_output within subprocess module have output error python shell:

attributeerror: 'module' object has no attribute 'check_output'

the code:

target = raw_input("ip: ") port = subprocess.check_output(["python", "portscanner.py", target ]) 

i use python 2.7. solution!

check_output() method defined in python2.7 onwards, said "martijn pieters"

check in subprocess.py line no: 515

def check_output(*popenargs, **kwargs): 

you may either using old python version or might have messed python interpreter.

try using

dir(module[.class])  

to find available methods or classes in module , proceed.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -