Jul-15-2019, 06:29 PM
Hello, I've been trying to learn python for one reason. I get a several hundred page report at work that looks like this:
RMDS1.GPCAN.* APADMIN NONE
Auditing: FAILURES(READ),SUCCESS(UPDATE)
Read Access: G132928, G202909(V), G215401, G299254, Q091665,
SYSMAN3, W80UJSX(V)
Update Access: No users with Update Access
Control Access: No users with Control Access
Alter Access: PSGPAP0(S), RMDSADM(S,O), RMDSADMN(G,O)
Access None: No users with None Access
RMDS1.SSDIPS0* APADMIN NONE
Auditing: FAIL(READ)
Read Access: CAPSADM(G), CAPSPGM(G), EDIPGM(G), G062315, G202909(V),
Q091665
Update Access: SSDIPS0(S,V)
Control Access: No users with Control Access
Alter Access: RMDSAP(G)
Access None: No users with None Access
I'd like to convert it to something that looks like this.

I thought I would start by trying to clean up the file first and remove what I don't need.
So far this what I have.
<filter object at 0x0000020893D49438><filter object at 0x0000020893D49400>
How can I get something like this but with the filter applied?

RMDS1.GPCAN.* APADMIN NONE
Auditing: FAILURES(READ),SUCCESS(UPDATE)
Read Access: G132928, G202909(V), G215401, G299254, Q091665,
SYSMAN3, W80UJSX(V)
Update Access: No users with Update Access
Control Access: No users with Control Access
Alter Access: PSGPAP0(S), RMDSADM(S,O), RMDSADMN(G,O)
Access None: No users with None Access
RMDS1.SSDIPS0* APADMIN NONE
Auditing: FAIL(READ)
Read Access: CAPSADM(G), CAPSPGM(G), EDIPGM(G), G062315, G202909(V),
Q091665
Update Access: SSDIPS0(S,V)
Control Access: No users with Control Access
Alter Access: RMDSAP(G)
Access None: No users with None Access
I'd like to convert it to something that looks like this.

I thought I would start by trying to clean up the file first and remove what I don't need.
So far this what I have.
invalid_chars = ['(G)', '(G,O)', '(O)', '(S)','(S,O)','(S,V)','(V)'] with open('PYTHON GDL Resources.txt' ,'r') as file: for line in file: # line = filter(lambda i: i not in invalid_chars, line) if 'No users with' in line: continue print(line, end='')With the filter applied (# removed) all I get is this.
<filter object at 0x0000020893D49438><filter object at 0x0000020893D49400>
How can I get something like this but with the filter applied?
