I am trying to call a process in linux bash using data stream signal '<' to use a file as input to an application.
However, this application do not receives its input from the file. I am using this:
#the application do not receives data stream from file
command = './grid < /home/felipe/Documents/proteins/grid.in'.split(' ')
p = subprocess.Popen(command,stdout=subprocess.PIPE)
But it does not work such as os.system(), that did what I want to do with subprocess:
#works
command = './grid < /home/felipe/Documents/proteins/grid.in'.split(' ')
os.system(command)
How can I use data stream signal '<' with subprocess module to get input to an application?