'Can piped output be separated to different processes in Python
I wish I understood how to just call up go programs within Python but instead I'm left with this question (so either of these questions can be answered)
When I use:
import sys
site = open(sys.argv[1])
for line in site:
print line
I get a list of addresses fed into a program, when what I want it to do is each seperately. For Example: let's say file.txt contains:
a.com
b.com
c.com
if I use them in the program like program.py file.txt | goprogram the go program then reads each one of those lines together in one bundle as:
goprogram a.com b.com c.com
whereas what I'm looking for is:
goprogram a.com
goprogram b.com
goprogram c.com
Any help?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
