17 |
# along with this program; if not, write to the Free Software |
# along with this program; if not, write to the Free Software |
18 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
# |
# |
20 |
# Author: Teddy Hogeborn <teddy@fukt.hk-r.se> |
# Author: Teddy Hogeborn <teddy@fukt.bth.se> |
21 |
# Folkparksv. 22 |
# Folkparksv. 22 |
22 |
# 372 38 Ronneby |
# 372 38 Ronneby |
23 |
# SWEDEN |
# SWEDEN |
71 |
stdout and lets any Python |
stdout and lets any Python |
72 |
errors show up on stderr |
errors show up on stderr |
73 |
|
|
74 |
Report bugs to <teddy@fukt.hk-r.se>. |
Report bugs to <teddy@fukt.bth.se>. |
75 |
""" |
""" |
76 |
sys.exit(0) |
sys.exit(0) |
77 |
|
|
103 |
tempfile.template="lpr-" + `os.getpid()` + "-" |
tempfile.template="lpr-" + `os.getpid()` + "-" |
104 |
socket_dir=tempfile.mktemp() |
socket_dir=tempfile.mktemp() |
105 |
|
|
106 |
# Try and create the directory, but don't fail if it already exists. |
# Try to create the directory, but don't fail if it already exists. |
107 |
try: |
try: |
108 |
os.mkdir(socket_dir, 0700) |
os.mkdir(socket_dir, 0700) |
109 |
except os.error, the_error: |
except os.error, the_error: |
135 |
except os.error, the_error: |
except os.error, the_error: |
136 |
pass |
pass |
137 |
|
|
138 |
# Try and create an unnamed socket. If we fail we call the cleanup |
# Try to create an unnamed socket. If we fail we call the cleanup |
139 |
# function to remove the directory and then call the default error |
# function to remove the directory and then call the default error |
140 |
# handler, which should abort. (The file/socket hasn't been created |
# handler, which should abort. (The file/socket hasn't been created |
141 |
# yet.) |
# yet.) |
237 |
smbserver = "obelix" |
smbserver = "obelix" |
238 |
smbprinter = "rby_4" |
smbprinter = "rby_4" |
239 |
smbservice = None |
smbservice = None |
240 |
smbserverip = "-I obelix.rby.hk-r.se" |
smbserverip = "-I obelix.rby.bth.se" |
241 |
smbclientoptions = "" |
smbclientoptions = "" |
242 |
smbclientcommand = "printmode graphics;print -" |
smbclientcommand = "printmode graphics;print -" |
243 |
if message.getheader('SmbClientFormat'): |
if message.getheader('SmbClientFormat'): |