When I run a command through subprocess I get exit status 1 without my print or the error raised.
here is my code:
    def generate_model(self):
        if not ((self.username == None) or (self.password == None) or (self.database == None)):
            cmd = "python -m pwiz -e %s -H %s -u %s -P %s %s > %s"%(self.engine,self.host,self.username,self.password,self.database,self.database+".py")
            print subprocess.check_call(cmd)
        else:
            raise ValueError
command asks an input once terminal is opened. After that it closes with exit status 1
When I run the same command directly in command prompt it works fine
 
     
     
    