Spawning under Windows

Dear All,
I am not a programmer, and have no knowledge of conventions for more
complex applications. The on-line docs. and tutorials have been perfect,
allowing me to write a simple program for polling devices on RS232 port. I
use an 'ini' file to configure the port characteristics. This works fine,
but having then discovered wxpython e.t.c. I have tried to add bells and
whistles so that the port config. could be set-up and changed dynamically,
using choicebox or buttonbox type of interface, and no ini file.

I am getting nowhere as to invoke such a box, leaves the application
suspended awaiting user input. I have tried Pexpect, and other 'spawn'
mechanisms, but I am getting the impression that spawn only works under
Unix, and not Windows (NT/2000).

Can anyone advise if I am banging my head against a brick wall in this
matter?

If there is an alternative utility that can spawn off a seperate user
interface which can communicate with the (still running) main program,
then I would be most grateful for any suggestions as to where to look for
this.

Regards
Martin Williams
HNS Ltd.

···

#**********************************************************************
This message is intended solely for the use of the individual
or organisation to whom it is addressed. It may contain
privileged or confidential information. If you have received
this message in error, please notify the originator immediately.
If you are not the intended recipient, you should not use,
copy, alter, or disclose the contents of this message. All
information or opinions expressed in this message and/or
any attachments are those of the author and are not
necessarily those of Hughes Network Systems Limited,
including its European subsidiaries and affiliates. Hughes
Network Systems Limited, including its European
subsidiaries and affiliates accepts no responsibility for loss
or damage arising from its use, including damage from virus.
#**********************************************************************

There are lots of possibilities for doing IPC in Python but this isn't really the forum to discuss that. It sounds like you don't really need it though. If all you need is to show a dialog and get values from it and then continue on with your otherwise non-gui program then that can be done without any spawning or IPC. Just create a separate module that looks like the following, and then when you want to invoke the dialog just import the module and call the getConfigValues function:

from wxPython.wx import *

class MyDialog(wxDialog):
  ...

def getConfigValues():
  app = wxPySimpleApp()
  dlg = MyDialog(...)
  if dlg.ShowModal() == wxID_OK:
    # get theValues from the dialog
  dlg.Destroy()
  app.MainLoop() # only needed for cleanup in this case
  return theValues

···

M.Williams@EU.HNS.COM wrote:

If there is an alternative utility that can spawn off a seperate user interface which can communicate with the (still running) main program,

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!