service windows avec py2exe

2006-11-10 Thread DarkPearl
Bonjour à tous,

apres avoir créer un service windows avec py2exe,
j'ai ce probleme quand je lance le service :

voici ce que je trouve dans le journal d'evenement :

The instance's SvcRun() method failed
: (-2147221020, 'Syntaxe incorrecte',
None, None)



je n'arrive pas du tout à trouver le probleme.

Peut etre que quelqu'un d'entre vous sais...

Merci

-- 
http://mail.python.org/mailman/listinfo/python-list


windows service with SNMP

2006-11-10 Thread DarkPearl
Sorry for language, i wanted post in FR.comp.lang.python.

But...

hello with all, after having to create a Windows service with py2exe, I
have this problem when I launch the service: here what I find in the
eventLog:

The instance's SvcRun() method failed
: (-2147221020, 'Syntaxe incorrecte',
None, None)

I don't find a the problem.

If you can help me, thank's

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: service windows avec py2exe

2006-11-11 Thread DarkPearl
I found the function which starts the error

**
class Win32ProcessUsage:
def __init__(self):
self.lstProcess=[]
self.WMIService =
win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
self.reset()
def reset(self):
self.lstProcess=[]
lstTmp = self.WMIService.ExecQuery('Select * from
Win32_Process')
for item in lstTmp:

self.lstProcess.append(tuple([item.Name,item.CommandLine,item.Status,item.ProcessId,item.ParentProcessId]))

def get_usage(self):
return self.lstProcess
**

it is a class which allows to obtain the list of the processes who run.

With python interpreter, this class functions very well but , when it
turns in service, it starts the error :

The instance's SvcRun() method failed
: (-2147221020, 'Syntaxe incorrecte',
None, None)

Why ???

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: service windows avec py2exe

2006-11-12 Thread DarkPearl
 ok,

It's this line who crash the service :

self.WMIService
=win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")


why this function goes when it is not a service?

with IDLE -> ok
with py2exe executable (no windows service) -> ok
with py2exe service option true (windows service) -> CRASH

-- 
http://mail.python.org/mailman/listinfo/python-list