Re: Help needed with Windows Service in Python

2010-09-02 Thread Edward Kozlowski
On Sep 2, 2:38 pm, Ian wrote: >   On 02/09/2010 20:06, Edward Kozlowski wrote: > > > > > On Sep 2, 10:22 am, Ian Hobson  wrote: > >> Hi All, > > >> I am attempting to create a Windows Service in Python. > > >> I have the framework (from Mark Ha

Re: Help needed with Windows Service in Python

2010-09-02 Thread Edward Kozlowski
main__': >    win32serviceutil.HandleCommandLine(PythonService) Looks to me like there may be a typo in your code. You probably meant win32event.SetEvent(self.hWaitStop), not wind32event. Regards, -Edward Kozlowski -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Edward Kozlowski
On Dec 5, 10:19 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > On Dec 5, 6:22 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 05 Dec 2007 18:20:35 -0300, Bret <[EMAIL PROTECTED]> escribió: > > > > I jus

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Edward Kozlowski
lina Try this: def __init__(self, host, port): self.done = False server = SimpleXMLRPCServer((host, port)) : : Bunch of server.register_function calls : def serverWrapper(): try: while not self.done: server.handle_request() except:

Re: simple question on dictionary usage

2007-10-26 Thread Edward Kozlowski
of the keys that start with the letter 'E'. In > otherwords it should look like this: > > egt = {'E6': '1182','E1': '1137','E4': '1157','E5': '1148', >'E2': '1169','E3': '1163'} > > This should be pretty easy, but somehow with all my googling I've > not found a hint. > > Thanks in advance > > -- > Frank Stutzman I think this should do the trick. There's probably something more concise than this, but I can't think of it at the moment. egt = {} for key in record: if key.startswith('E'): egt[key] = record[key] print egt {'E5': '1148', 'E4': '1157', 'E6': '1182', 'E1': '1137', 'E3': '1163', 'E2': '1169'} -Edward Kozlowski -- http://mail.python.org/mailman/listinfo/python-list

Re: failing to instantiate an inner class because of order of inner classes

2006-12-27 Thread Edward Kozlowski
Pyenos wrote: > class model:pass > class view: > model() > class controller: > model() > > I can instantiate clsss model from inside class view but I can't > instantiate class model from inside controller, due to the nature of > python interpreter. > > I wish to circumvent this rest

Re: list1.append(list2) returns None

2006-12-20 Thread Edward Kozlowski
Pyenos wrote: > def enlargetable(table,col): > return table.append(col) > > def removecolfromtable(table,col): > return table.remove(col) > > print enlargetable([[1],[2],[3]],[4]) # returns None > > Why does it return None instead of [[1],[2],[3],[4]] which I expected? return the table.