LINUX.ORG.RU

История изменений

Исправление amazpyel, (текущая версия) :

answer = Popen(child.sendline('75'), shell=True, stdout=PIPE).communicate()[0]
print answer

Результат:

Traceback (most recent call last):
  File "/home/amazpyel/autotest/test.py", line 85, in <module>
    answer = Popen(child.sendline('75'), shell=True, stdout=PIPE).communicate()[0]
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1122, in _execute_child
    args = list(args)
TypeError: 'int' object is not iterable

Process finished with exit code 1

Исходная версия amazpyel, :

answer = Popen(child.sendline('75'), shell=True, stdout=PIPE).communicate()[0]
print answer

Результат:

Traceback (most recent call last):
  File "/home/amazpyel/autotest/test.py", line 85, in <module>
    answer = Popen(child.sendline('75'), shell=True, stdout=PIPE).communicate()[0]
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1122, in _execute_child
    args = list(args)
TypeError: 'int' object is not iterable

Process finished with exit code 1
[/python]