S
schwerdy
Hi Python-Fans
I'm confused! :-(
I created a script that handles SC and CSV files. To convert CSV (or
in my case: pipe ('|') seperated values) to SC, I want to hunt my CSV
lines through /usr/bin/psc. Therefore I did:
tofilter, fromfilter, error = os.popen3("psc -S -L -d '|'")
map(tofilter.write,lines)
tofilter.close()
For some CSV-files my script freezes at tofilter.close(). Removing
some lines from the "lines" sequence (that represents the CSV-file)
always helps. But imho "psc" is not the cause. Piping my CSV-file
through psc in bash always works. Isn't it crazy? I tried python2.2
and python2.3 from the debian distribution.
Anyone who has an explanation, workaround, hint or anything?
Schwerdy
I'm confused! :-(
I created a script that handles SC and CSV files. To convert CSV (or
in my case: pipe ('|') seperated values) to SC, I want to hunt my CSV
lines through /usr/bin/psc. Therefore I did:
tofilter, fromfilter, error = os.popen3("psc -S -L -d '|'")
map(tofilter.write,lines)
tofilter.close()
For some CSV-files my script freezes at tofilter.close(). Removing
some lines from the "lines" sequence (that represents the CSV-file)
always helps. But imho "psc" is not the cause. Piping my CSV-file
through psc in bash always works. Isn't it crazy? I tried python2.2
and python2.3 from the debian distribution.
Anyone who has an explanation, workaround, hint or anything?
Schwerdy