Posts: 4,647
Threads: 1,494
Joined: Sep 2016
Dec-31-2016, 04:33 AM
(This post was last modified: Dec-31-2016, 04:33 AM by Skaperen.)
i am wanting a command to output one (small) file in a text box, much like those relational db tools often do.
edit 1:
it would be a plus to put the file name somewhere reasonable in the output.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i mean something like:
Output:
+--------------+
| this is text |
| in a little |
| box |
+--------------+
and i am wanting to do it in python.
this one should be a module function and command in one file.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 1,298
Threads: 38
Joined: Sep 2016
if you're using linux, you might also try
Urwid or
npyscreen
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i went ahead an wrote my own version of it.
it is not thoroughly tested but seems to work ok.
Output:
lt1/forums /home/forums 48> python box.py box.txt wide.txt | python box.py
+---<STDIN>-----------------+
| +--------------+ |
| | this is text | |
| | in a little | |
| | box | |
| +--------------+ |
| +---<wide.txt>----------+ |
| | this is text | |
| | in a definitely wider | |
| | box | |
| +-----------------------+ |
+---------------------------+
lt1/forums /home/forums 49>
the code is over
here.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.