Pythoncom shutdown problems

Discussion in 'Python' started by Hannes Grund, Jul 27, 2003.

  1. Hannes Grund

    Hannes Grund Guest

    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
    Hannes Grund, Jul 27, 2003
    #1
    1. Advertising

  2. "Hannes Grund" <-berlin.de> wrote in message
    news:...
    > 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.
    Michael Porter, Jul 27, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc ENGEL
    Replies:
    0
    Views:
    427
    Marc ENGEL
    Jul 30, 2003
  2. Fabien SK

    pythoncom + set property

    Fabien SK, Aug 22, 2003, in forum: Python
    Replies:
    0
    Views:
    316
    Fabien SK
    Aug 22, 2003
  3. Paul
    Replies:
    3
    Views:
    504
  4. Ashley

    PythonCOM help needed

    Ashley, Oct 22, 2003, in forum: Python
    Replies:
    0
    Views:
    362
    Ashley
    Oct 22, 2003
  5. Replies:
    1
    Views:
    69
    dieter
    May 7, 2014
Loading...

Share This Page