<div dir="ltr">Here is a very simple python script which will send a file to stdout with the proper esc sequence for the terminal to see it as a print job. I don't recommend testing it with anything other than small text files. I did notice that screen seems to "work". I do have a much "better" version of the bellow script which has a lot of error checking and actually reads the file in small chunks while writing it to stdout. But this one gets the idea across very quickly.<div>
<br></div><div><br></div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">#!/usr/bin/python
import tty, sys, termios
# read file and waste lots of memory while doing it
try:
        tmpfile = sys.argv[1]
except:
        print "\nPlease pass in a file name\n"
        sys.exit()
fileobj = open(tmpfile, mode='rb')
data = fileobj.read()
fileobj.close()
# Get term props and make stdout raw
att = termios.tcgetattr(sys.stdout)
tty.setraw(sys.stdout)
sys.stdout.write("\033[5i" + data + "\033[4i")
# reset terminal
termios.tcsetattr(sys.stdout, termios.TCSADRAIN , att)</pre></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 17, 2013 at 10:37 AM, Chris Clonch <span dir="ltr"><<a href="mailto:chris@theclonchs.com" target="_blank">chris@theclonchs.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> A quick test with a single 80x24 window horizontally split into two<br>
> 40x24 panes and running "tput cup 0 60" results in the first letter of<br>
> my prompt at the end of row 1 and cursor placed after the prompt on row 2.<br>
<br>
</div>Screenshot of my term..<br>
<br>
<a href="http://en.zimagez.com/zimage/screenshot-05172013-103530am.php" target="_blank">http://en.zimagez.com/zimage/screenshot-05172013-103530am.php</a><br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
colug-432 mailing list<br>
<a href="mailto:colug-432@colug.net">colug-432@colug.net</a><br>
<a href="http://lists.colug.net/mailman/listinfo/colug-432" target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
</div></div></blockquote></div><br></div>