GoodPotatoes wrote:
I am using the module active_directory and have an ad object called
myuser.
I would like to run a series of statements like:
myuser.attribute
where attribute is a string variable, but python says that this is not
the correct syntax.
error:
for x in myuser.properties: # "myuser.properties" returns a tuple
of properties associated with the myuser AD object
print myuser.x
Traceback (most recent call last):
File "<pyshell#148>", line 2, in <module>
print myuser.x
File "build\bdist.win32\egg\active_directory.py", line 421, in
__getattr__
raise AttributeError
AttributeError
My previous suggestion was assuming that elements of myuser.properties
were strings (names of the properties). If instead they are the
properties then you'd
print x
--
Bob Gailer
Chapel Hill NC
919-636-4239
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor