#import nester
import pickle

man = []
other = []

try:
    data = open('sketch.txt')

    for each_line in data:
        try:
            (role, line_spoken) = each_line.split(':', 1)
            line_spoken = line_spoken.strip()
            if (role == 'Man'):
                man.append(line_spoken)
            elif (role == 'Other Man'):
                other.append(line_spoken)
        except ValueError:
            pass

    data.close()

except IOError:
    print('The datafile is missing!')


try:
    with open('man_data.txt', 'wb') as manfile:
        pickle.dump(man, manfile)
        #nester.print_lol(man, outfile=manfile)
    with open('other_data.txt', 'wb') as otherfile:
        #nester.print_lol(other, outfile=otherfile)
        pickle.dump(other, otherfile)
except IOError:
    print('write file error!')
except pickle.PickleError as perr:
    print('Pickle Error ' + str(perr))
    

fa6e1942160a6d6032914c3cb301e37f615c03c0
<mask token>

<mask token>
try:
    data = open('sketch.txt')
    for each_line in data:
        try:
            role, line_spoken = each_line.split(':', 1)
            line_spoken = line_spoken.strip()
            if role == 'Man':
                man.append(line_spoken)
            elif role == 'Other Man':
                other.append(line_spoken)
        except ValueError:
            pass
    data.close()
except IOError:
    print('The datafile is missing!')
try:
    with open('man_data.txt', 'wb') as manfile:
        pickle.dump(man, manfile)
    with open('other_data.txt', 'wb') as otherfile:
        pickle.dump(other, otherfile)
except IOError:
    print('write file error!')
except pickle.PickleError as perr:
    print('Pickle Error ' + str(perr))

<mask token>
man = []
other = []
try:
    data = open('sketch.txt')
    for each_line in data:
        try:
            role, line_spoken = each_line.split(':', 1)
            line_spoken = line_spoken.strip()
            if role == 'Man':
                man.append(line_spoken)
            elif role == 'Other Man':
                other.append(line_spoken)
        except ValueError:
            pass
    data.close()
except IOError:
    print('The datafile is missing!')
try:
    with open('man_data.txt', 'wb') as manfile:
        pickle.dump(man, manfile)
    with open('other_data.txt', 'wb') as otherfile:
        pickle.dump(other, otherfile)
except IOError:
    print('write file error!')
except pickle.PickleError as perr:
    print('Pickle Error ' + str(perr))

import pickle
man = []
other = []
try:
    data = open('sketch.txt')
    for each_line in data:
        try:
            role, line_spoken = each_line.split(':', 1)
            line_spoken = line_spoken.strip()
            if role == 'Man':
                man.append(line_spoken)
            elif role == 'Other Man':
                other.append(line_spoken)
        except ValueError:
            pass
    data.close()
except IOError:
    print('The datafile is missing!')
try:
    with open('man_data.txt', 'wb') as manfile:
        pickle.dump(man, manfile)
    with open('other_data.txt', 'wb') as otherfile:
        pickle.dump(other, otherfile)
except IOError:
    print('write file error!')
except pickle.PickleError as perr:
    print('Pickle Error ' + str(perr))

#import nester
import pickle

man = []
other = []

try:
    data = open('sketch.txt')

    for each_line in data:
        try:
            (role, line_spoken) = each_line.split(':', 1)
            line_spoken = line_spoken.strip()
            if (role == 'Man'):
                man.append(line_spoken)
            elif (role == 'Other Man'):
                other.append(line_spoken)
        except ValueError:
            pass

    data.close()

except IOError:
    print('The datafile is missing!')


try:
    with open('man_data.txt', 'wb') as manfile:
        pickle.dump(man, manfile)
        #nester.print_lol(man, outfile=manfile)
    with open('other_data.txt', 'wb') as otherfile:
        #nester.print_lol(other, outfile=otherfile)
        pickle.dump(other, otherfile)
except IOError:
    print('write file error!')
except pickle.PickleError as perr:
    print('Pickle Error ' + str(perr))
    
