473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Pythoncom shutdown problems

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

Jul 18 '05 #1
1 2063

"Hannes Grund" <gr******@cs.tu-berlin.de> wrote in message
news:ma**********************************@python.o rg...
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.


Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when...
0
by: Ashley | last post by:
I have quite a few COM servers implemented using Visual C++ 6.0 and I'm having trouble accessing all of them via Python. The problem is with the default being set to pythoncom.Empty while my...
2
by: John J. Lee | last post by:
Dear, I have problems when I get the IDispatch with pythoncom.connect(). When I called the 'Excel.Application' with it, it worked. (At least I can see the pythoncom.connect() is working for the...
5
by: Brian Hlubocky | last post by:
I'm have a fairly simple (in terms of COM) python program that pulls info from an Access database and creates Outlook contacts from that information. It uses wxPython for gui and works without...
0
by: Olaf Meding | last post by:
How does Python (version 23 on Windows) know what to import? I could not find a file or directory named "pythoncom". import pythoncom help(pythoncom) FILE c:\windows\system32\pythoncom23.dll...
1
by: fraca7 | last post by:
Hello. I got a little problem while using pythoncom to automate IE; for some reason, changing the 'selectedIndex' on an instance of IHTMLSelectElement doesn't fire the 'onchange' event (I guess...
3
by: IdleBrain | last post by:
Gurus, I am trying to delay Windows Shutdown/Restart to perfrom cleanup and I am using the following code: protected override void WndProc(ref Message ex)
6
by: gcmartijn | last post by:
H! I using a script that opens a internet page in a small window (what I can control) In XP everything was working fine, but now I'm using Vista with IE7 and this is what happends now: First...
0
by: Gabriel Genellina | last post by:
En Wed, 27 Aug 2008 21:17:22 -0300, Vistro <vistro@vistro.netescribi�: Reinstalling the pywin32 package should fix that, I presume. In fact that __import_whatever function does a rather...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.