On Dec 4, 2007 12:02 PM, Andrew McNabb <[EMAIL PROTECTED]> wrote: > So, all of these years I've been using a2ps to send files to the > printer. I've never really liked the way it does code formatting, > especially for Python. It uses a fixed-width font for code and a > variable-width font for comments, so multi-line comments always have > strange indenting. > > Anyway, I just ran into enscript for the first time today. I'm sure > some of you have been using it for years, but it's new to me, and it > seems to be working better. I just did: > > enscript --pretty-print test_sort.py >
I had a reason to print out some code for the first time in a long time this week and your enscript tip was very timely. When I man enscript on my Gutsy Gibbon box, pretty-print isn't listed as an option. This is what I got to work nicely for me: enscript -Mletter --printer-options='-o HPStaplerOptions=1leftAngled' -E --color file.cpp -M sets the paper size (it was defaulting to A4 and cutting stuff off at the top/bottom margins) -E does code highlighting --color does the highlighting in color (if you have a color printer that's nice) the --printer-option tells our HP CM8060 MFP to staple the printed pages, which is such a nice touch, if I do say so myself. Very cool. Thanks for the tip, Andrew. Bryan -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/mailman/listinfo/uug-list
