[Tutor] Where best to start? First program to: login, read from and close a serial line?

Kirby Urner urnerk@qwest.net
Mon, 10 Jun 2002 08:27:37 -0700


>
>Any advice on the general idea of what should take place will be most
>welcome.
>
>Thanks much,
>
>Bill

Hi Bill --

Probably easiest if you can wrap Python around the system
commands you already use.  t = popen('cmd') will execute
'cmd' (what you'd normally enter in the shell) and
t.readlines() will give back a list of what 'cmd'
returns, e.g. in the Python shell:

    >>> from os import popen
    >>> t = popen('ls')
    >>> for line in t.readlines():  print line,

should echo a directory listing to your screen.

So you should be able to pop up GUI widgets ala Tkinter
which wrap your existing system commands.  While testing,
you might write some dummy scripts on a standalone box
to simulate the commands and their return values.

Kirby