Newbie Questions

Cameron Laird claird at
Thu Jan 17 17:24:13 CET 2002

In article <mailman.1011212508.21110.python-list at>,
maximilianscherr <MaximilianScherr at> wrote:
>I want my script to ask some questions, write the answers to some 
>config files for an external program, start this immediately by 
>sending an ENTER input to the application.
>And after this the program should wait for a (socket?)request from a 
>server, and then exit.
I'm lost.  While I'm reasonably certain what you want
is feasible, I don't know what it is you want.

Servers don't make requests.  *Clients* do.  I'll put
aside the entire "And after this ..." paragraph for now.

You have a Tkinter application.  You want users to fid-
dle with it for a while, then something happens (maybe
a "Push me to make things happen now" button), and
configuration information is written to an external
file.  I think you're saying you can do that already.
Immediately after, your Tkinter application should
launch a specific external program.  Python has several
mechanisms to effect this.  When you write, "... by
sending an ENTER input to the application", I think
you're saying that the external program expects a bit
of interaction on its stdin.  If that's all you're
after, you're in luck; it's easy to use os.popen:
  import os
  file_handle = os.popen('external_program', 'w')

Cameron Laird <Cameron at>

More information about the Python-list mailing list