Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting screen output without GUI...

Status
Not open for further replies.

mg9176

MIS
Jun 24, 2003
7
US
Ok, so, yes, I know how to format output using format STDOUT.... What I'm looking to do here is to format the screen into subsections, and redirect output to each section independantly without X11 or any outer gui, so that a user with telnet is A-ok; kind of reminiscent of a tn3270 session into a MVS system... Such as this:

[tt]
|=================================================|
| $sectionA | $sectionB |
|=================================================|
| HEADER CAUSE THIS HAS COLUMNS |
| $sectionC |
| this is a split list using format |
| and should not cause any of the info to go off |
| the screen due to length, but should scroll up |
| if it gets too long, like a scroll list...
|
|=================================================|
[/tt]

I don't want to use temp files, and there has to be a
way to do this without using such.

Please help! Thanks in advance,

mg9176

____________________________________________________
Perl ain't coding; Perl's more intelligent than that
 
If you're on *ix, then it looks like a job for curses! I havn't used it myself for many years but it's precisely the tool for this job and there is a perl curses library for perl: see
The host has an extensible library of terminal definition files and curses looks after terminal independance by reading a definition from this library. It allows box-drawing, scrollable sub-windows and all that good stuff.

Having said that, it is pretty low level and you may find some wrappers to make particular tasks, eg menus, simpler.

Yours,


fish

"As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilkes
 
Yep. Haven't used curses for a couple of years myself. I was hoping to find an OS independant method, as this script runs on both *IX and (blargh) Windoze.

Thanks for the idea... Wonder if there are curses libraries for Doze... ;)

Anyone else got an idea? I'd hate to have to start maintaining two versions of this thing...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top