Hi, from my login i want to login as a other user ,

Ganesan Rajagopal rganesan at myrealbox.com
Wed Nov 9 17:24:42 CET 2005


>>>>> sumi  <suma_37 at yahoo.com> writes:

> Hi, i am very new to python , it is just 2 days i started reading abt
> it. I did not understand the above statement.  

Just read the document at the URL given to you.

> what i want to do is , i want to login as a super user eg : $su xyz , and
> then i need to enter the passwd, i want to do these steps using python ,
> how can i do it??????????

This is a slightly better description of the problem. However it's still not
clear what exactly you want to achieve. Do you need to continue running your
python script as the new user? Or do you want to run other commands as teh
new user? In any case, take a look at pexpect
(http://pexpect.sourceforge.net) and see if it fits your purpose.

Ganesan

-- 
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan        | http://rganesan.blogspot.com





More information about the Python-list mailing list