[Tutor] Tuple!

Wilhelmsen Jan Jan.Wilhelmsen at bilia.no
Fri Apr 2 03:35:20 EST 2004


Hi!

 

I have a tuple which is created from group membership of a user in active
directory, the values becomes unicode strings. I need to do the following:

Encode the values.

Delete all the values that don't match with a certain search string, and
when a match occurs I need to replace the value with a number.

Then finally I need to write this value in a text file.

 

If anyone could help me with some tips it would be great.

 

The tuple might look like this:

 

(u'CN=NO GG PRO Intranet,OU=Common Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy',
u'CN=NO GG NO Users,OU=Common Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy',
u'CN=SE GG APP TACDIS OST,OU=SE Application
groups,OU=Groups,OU=SE,DC=xxxx,DC=yyy', u'CN=NO GG APP KundMarknad
Admin,OU=Application Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy', u'CN=NO GG APP
CarWebII,OU=Application Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy', u'CN=SE APPS
VCOM OST,OU=SE Application groups,OU=Groups,OU=SE,DC=xxxx,DC=yyy', u'CN=NO
COM Local Logon script,OU=Common Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy',
u'CN=NO GG SYS Admin,OU=Admin Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy',
u'CN=NO USG HQ IT,OU=User Groups
(Organisation),OU=Groups,OU=NO,DC=xxxx,DC=yyy', u'CN=NO USG HQ Salg,OU=User
Groups (Organisation),OU=Groups,OU=NO,DC=xxxx,DC=yyy', u'CN=NO USG \xd8kern
Administrasjon,OU=User Groups
(Organisation),OU=Groups,OU=NO,DC=xxxx,DC=yyy', u'CN=NO GG APP
KundMarknad,OU=Application Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy', u'CN=NO
APP Outlook Users,OU=Application Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy',
u'CN=NO GG CTX Admin,OU=Admin Groups,OU=Groups,OU=NO,DC=xxxx,DC=yyy')

 

Thanks in advanced

 

 

Med vennlig hilsen / Best regards

 

Jan Wilhelmsen

IT-Technician

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040402/2e44ecd1/attachment-0001.html


More information about the Tutor mailing list