Piping Input to TextPad

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Piping Input to TextPad

Post by talleyrand »

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.
I choose to fight with a sack of angry cats.
User avatar
bbadmin
Site Admin
Posts: 1038
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

The concept of stdin and stdout has no meaning for Windows applications, so it's not possible to redirect them through pipes.

Keith MacDonald
Helios Software Solutions
Post Reply