Don, On Sep 11, 10:54 pm, Don Hanlen <[EMAIL PROTECTED]> wrote: > I'm writing a simple GUI that: > ..gets info via telnet protocol (and sends) > ..gets info via http (and sends) > ..gets user-info from (currently) > ...Tkinter Text windoze > ...Tkinter buttons and such > ..displays info in various Tkinter windoze > ...graphic AND text... > > I can accomplish all of these functions individually and now seem to > need to set up multi-processes to combine 'em. Back in my C days, I'd > have used fork/exec to do so, but I'm confused by the number of > modules available in Python. Is there a "best" for portability and > simplicity? (Or am I on the wrong track here?) > > I could solve my problems with the following psuedo-code made into > real code: > ---- > import blah > > t = blah.fork(runthisprogram.py) > > #OK still in main > t.sendinfo(info) > info = t.receiveinfo() > ---- > #runthisprogram.py > def sendinfobacktopapa(): > ? eventhere > def getinfofrompapa(): > ? eventhere > ---- > > It seems to me that propagating events *may* be the best way to > communicate. I'm wide open, including to non-multi-process solutions. > > Thanks for your comments, I searched old posts for a while, various > other Python info-sources, and couldn't find an answer. > -- > don
You can also use threads, which is a little bit more portable than using Python's fork methodology, or so I've read. The concepts on this page can be applied to any GUI toolkit you choose: http://wiki.wxpython.org/LongRunningTasks I've used them with wxPython, but iirc, Lutz does something quite similar with Tkinter in his latest edition of "Programming Python". I think what Michele is referring to is the subprocess module, which is also useful. Mike -- http://mail.python.org/mailman/listinfo/python-list