#!/usr/bin/env python
# -*- coding: utf-8 -*-
from twisted.internet import reactor
from hylaproto_t import *
class test:
def __init__(self):
self._h = HylafaxProto('localhost', 'michele' ,
callBackOnStatus=self.update, callBackOnError=self.err,
passive=1,
dateTimeRcvUse=False)
self._h.debug = 1
reactor.run()
def update(self):
self._s = SendFax()
self._s.dialstring = "100"
self._s.fromuser = "michele"
self._s.file_list = "/tmp/cp.pdf"
self._s.notify = "requeue"
#print self._s.GetSendValues(("file_list", ))
self._h.SendFax(self._s)
def err(self, *args, **kw):
print "err", args, kw
reactor.stop()
test()
|