0
subprocess.call("exit 1", shell=True)
AttributeError: 'module' object has no attribute 'call',
這是我收到的錯誤,當我編譯它在Linux中, 這裏是源代碼:錯誤而使用python supprocess.call方法,
import subprocess
import sys
import random
import os
subprocess.call("exit 1", shell=True)
也許你命名了一個模塊(或者可能是當前模塊)'subprocess.py'。嘗試打印'subprocess .__ file__'。 – 2014-11-21 13:17:12