import pkg_resources
pkg_resources.require('aphla')
import aphla as ap

# Load the machine
ap.machines.load('SRI21')
sri21_pvs = set()

# Find unique pv names for SRI21
BPMS = ap.getElements('BPM')

for BPM in range(len(BPMS)):
    pv_name = BPMS[BPM].pv()[0].split(':')[0]
    sri21_pvs.add(pv_name)
    
# Load the machine
ap.machines.load('VMX')
vmx_pvs = set()

# Find unique pv names for SRI21
BPMS = ap.getElements('BPM')

for BPM in range(len(BPMS)):
    pv_name = BPMS[BPM].pv()[0].split(':')[0]
    vmx_pvs.add(pv_name)
    
print 'All PVs in \'SRI21\' that are not in \'VMX\''
print sri21_pvs - vmx_pvs

print 'All PVs in \'SRI21\' that are not in \'VMX\''
print vmx_pvs - sri21_pvs

Modify caget method to convert to values using a list
Modify caget method to convert to values using a list

Also refactoring some of the variables names.
