[Tutor] Putting a variable into a statement
goodpotatoes at yahoo.com
Fri Oct 16 00:04:14 CEST 2009
I am using the module active_directory and have an ad object called myuser.
I would like to run a series of statements like:
where attribute is a string variable, but python says that this is not the correct syntax.
for x in myuser.properties: # "myuser.properties" returns a tuple of properties associated with the myuser AD object
Traceback (most recent call last):
File "<pyshell#148>", line 2, in <module>
File "build\bdist.win32\egg\active_directory.py", line 421, in __getattr__
>>> myuser.properties #first value in user tuple
How can I iterate through all of the values of the properties tuple and get each value?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor