<br><br><div class="gmail_quote">On Wed, Apr 15, 2009 at 4:35 PM, fridash13 <span dir="ltr"><<a href="mailto:fridash13@yahoo.com">fridash13@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
i am quite new to python ...<br>
<br>
i made a small script ,, for active directory using python<br>
<br>
all the script does is basicly explor the AD for a number of tasks ..<br>
<br>
* 1 .Find a user (quick method)<br>
* 2 .Find a computer (quick method)<br>
* 3 .List all users<br>
* 4 .List users in an OU<br>
* 5 .List all groups<br>
* 6 .Show the members of a group<br>
* 7 .Show the types of a group<br>
* 8 .List the groups a user is in<br>
<br>
i have used the AD moudle for this script ..<br>
<br>
my question is this i have the follwing code :<br>
<br>
# find user (<br>
elif choice == "1":<br>
import active_directory<br>
user = active_directory.find_user ("ron")<br>
print user<br>
<br>
how can i make the entry for the "user" (in this case ("ron")<br>
shift according to raw input from the user<br>
<br>
so if the user typs jhonny it will replace ("ron")<br>
<br>
i need the ability to replace the name<br>
how can i accomplise this ?<br>
<font color="#888888"></font></blockquote><div><br>Python tries to be pretty intuitive. You get raw input from the user by using raw_input.<br><br>name = raw_input("enter a user: ")<br>user = active_directory.find_user(name) <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>