Mercurial > hg > zebra
comparison zebra.py @ 27:7c132e01c281 0.0.5
Add -oraw to lpr command
author | Ben Croston <ben@croston.org> |
---|---|
date | Mon, 27 Apr 2015 11:38:07 +0100 |
parents | 20f6df6d3f42 |
children | 63d1260cc64e |
comparison
equal
deleted
inserted
replaced
26:20f6df6d3f42 | 27:7c132e01c281 |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2011-2013 Ben Croston | 3 # Copyright (c) 2011-2015 Ben Croston |
4 # | 4 # |
5 # Permission is hereby granted, free of charge, to any person obtaining a copy of | 5 # Permission is hereby granted, free of charge, to any person obtaining a copy of |
6 # this software and associated documentation files (the "Software"), to deal in | 6 # this software and associated documentation files (the "Software"), to deal in |
7 # the Software without restriction, including without limitation the rights to | 7 # the Software without restriction, including without limitation the rights to |
8 # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | 8 # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
39 | 39 |
40 def _output_unix(self, commands): | 40 def _output_unix(self, commands): |
41 if self.queue == 'zebra_python_unittest': | 41 if self.queue == 'zebra_python_unittest': |
42 p = subprocess.Popen(['cat','-'], stdin=subprocess.PIPE) | 42 p = subprocess.Popen(['cat','-'], stdin=subprocess.PIPE) |
43 else: | 43 else: |
44 p = subprocess.Popen(['lpr','-P%s'%self.queue], stdin=subprocess.PIPE) | 44 p = subprocess.Popen(['lpr','-P{}'.format(self.queue),'-oraw'], stdin=subprocess.PIPE) |
45 p.communicate(commands) | 45 p.communicate(commands) |
46 p.stdin.close() | 46 p.stdin.close() |
47 | 47 |
48 def _output_win(self, commands): | 48 def _output_win(self, commands): |
49 if self.queue == 'zebra_python_unittest': | 49 if self.queue == 'zebra_python_unittest': |