Piping Input to TextPad
Posted: Thu Oct 09, 2003 10:35 pm
This may fall under the same thing as reading from STDIN but I'm not entirely certain. I haven't found any other questions dealing with pipes so I'll ask. In Unix, it's common to be able to pipe the output from one application into another ($ cat mbox | grep Spam | cut -c5- | sort | ...) Never having written one of those apps, is it possible to push the results into TextPad (currently running or not)?
Currently, I have some Python scripts (big surprise there) that query databases to determine their structure and then build procedures to add, update and remove data from a given table/view. Currently I just save the data into a SQL file and open it up in TextPad. What I was looking to do would be something like
F:\python>python documenter.py | textpad
instead of
F:\python>python documenter.py > results.py
F:\python>textpad results.py
The above assumes that textpad is part of your path, which it is on my machine.
If not, it's no big deal, this was more of an idle curiosity thing.
In fact, I suppose if I configured TP to run my Python instead of my precious command line, I could dump the results to a window automagically. Ok, so I have solved the itch I had now I'm just curious if there's a way to do it that I'm missing
Thanks.
Currently, I have some Python scripts (big surprise there) that query databases to determine their structure and then build procedures to add, update and remove data from a given table/view. Currently I just save the data into a SQL file and open it up in TextPad. What I was looking to do would be something like
F:\python>python documenter.py | textpad
instead of
F:\python>python documenter.py > results.py
F:\python>textpad results.py
The above assumes that textpad is part of your path, which it is on my machine.
If not, it's no big deal, this was more of an idle curiosity thing.
In fact, I suppose if I configured TP to run my Python instead of my precious command line, I could dump the results to a window automagically. Ok, so I have solved the itch I had now I'm just curious if there's a way to do it that I'm missing
Thanks.