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
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
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
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:
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
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
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.