Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Pythoncom shutdown problems

Reply
Thread Tools

Pythoncom shutdown problems

 
 
Hannes Grund
Guest
Posts: n/a
 
      07-27-2003
Dear all,
probably offtopic for the general python list, but I don't know were to go
else.

I'm currently developing somekind of middleware
wich makes heavy use of pythonwin/com extensions.
(The complete setup is: win2000/winXP, python2.2,
win32all-152, wxPython resp. wxWindows).

The software is aimed to manage data held by a software
suite (called chemoffice) to manage chemical substances.
It exposes it main components via COM, the intagration
to python via win32com.client.Dispatch works well.
The problem:

When calling a special method on some of these COM objects
one component launches a process which appears to be a subprocess
of svchost.exe.
The result is that I'm unable to terminate the python process
after this process has been started, furthermore if
I shutdown the python process manually, it keeps alive, causing
problems during windows shutdown (i.e. you have to remove
it manually as well).

Any help or hint would be highly appreciated,

thanks in advance,
Hannes Grund



 
Reply With Quote
 
 
 
 
Michael Porter
Guest
Posts: n/a
 
      07-27-2003

"Hannes Grund" <> wrote in message
news:mailman.1059266799.22153.python-...
> Dear all,
> probably offtopic for the general python list, but I don't know were to go
> else.
>
> I'm currently developing somekind of middleware
> wich makes heavy use of pythonwin/com extensions.
> (The complete setup is: win2000/winXP, python2.2,
> win32all-152, wxPython resp. wxWindows).
>
> The software is aimed to manage data held by a software
> suite (called chemoffice) to manage chemical substances.
> It exposes it main components via COM, the intagration
> to python via win32com.client.Dispatch works well.
> The problem:
>
> When calling a special method on some of these COM objects
> one component launches a process which appears to be a subprocess
> of svchost.exe.
> The result is that I'm unable to terminate the python process
> after this process has been started, furthermore if
> I shutdown the python process manually, it keeps alive, causing
> problems during windows shutdown (i.e. you have to remove
> it manually as well).
>
> Any help or hint would be highly appreciated,
>
> thanks in advance,
> Hannes Grund
>


This may be unrelated, but I had a similar problem when using Python via COM
as a scripting language with the XMetal XML editor. In this case XMetal
would refuse to shut down after running one of my Python macros (the GUI
would disappear but the xmetal process would not close and would have to be
sutdown manually).

The solution in this case was to explicitly run the Python garbage collector
before shutdown by installing an Macro which did:

import gc
gc.collect()

Perhaps a similar thing might work for you?

Mike.




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pythoncom.connect() John J. Lee Python 2 11-23-2003 02:30 PM
PythonCOM help needed Ashley Python 0 10-22-2003 10:49 PM
pythoncom - 'module' object has no attribute 'frozen' Paul Python 3 10-18-2003 07:31 AM
pythoncom + set property Fabien SK Python 0 08-22-2003 02:03 PM
pythoncom: STA python COM server randomly does not receive event from other objects : deadlock Marc ENGEL Python 0 07-30-2003 09:19 AM



Advertisments