[Tutor] python scripting and unix

alan.gauld@bt.com alan.gauld@bt.com
Tue, 29 Jan 2002 10:56:32 -0000


> import os
> os.system("clear")

So you already know about system()

> 
> from sudialg import *
> if ask_who():   #gets user input for first answer, returns 1 
> if correct
>   #continues
> 
> else:
>    exit   #I want the telnet session to end 
>             #but this is just exiting the script

Have you tried os.system('logout') or os.system('exit')?

Just a thought, I haven't tried.

Alan g.