On 20Aug2014 16:35, Dima Kulik wrote:
Hi to all. I have a problem with parsing file.
I have txt file exported from AD and it has such structure:
DistinguishedName : CN=*** ,OU=*** ,OU=*** ,DC=*** ,DC=***,DC=***
GroupCategory : Distribution
GroupScope : Universal
Name : *
> i need to export to file all stings which start from "Name"
>
> I've tried to make little parser:
>
> keywords = ['Name', 'Name:']
> input_file=open("Mail_Groups.txt","r").readlines()
> output_file=open("Out.txt","w")
> for line in input_file:
> for word in line.split():
> if word in
Dima Kulik Wrote in message:
Please post in text mode. The html mode you used can cause
multiple problems.
Please specify your Python version and os version in any new
thread.It sometimes makes a big difference in the
solution.
Your primary problem is that you don't close the files.
But yo
Hi to all. I have a problem with parsing file.
I have txt file exported from AD and it has such structure:
DistinguishedName : CN=*** ,OU=*** ,OU=*** ,DC=*** ,DC=***,DC=***
GroupCategory : Distribution
GroupScope : Universal
Name :
ObjectClass : group
ObjectGUI