I'm trying to do some jython scripting to create Buses, Destination Queues, Connection Factories, jms Queues, and Activation Specifications.
I need to check to see if an item exists before creating it. I'm presently trying to do that with Buses, but I can not get a syntax that will work for me.

All variable names are in uppercase.
I'm reading Bus names from a csv file and setting them as BNAME variable. If I use the real name of the bus (ie. RealBus) it works, but if I try to substitute BNAME, I can't get a syntax that will give the correct results. So RESULT4 and RESULT5 below give the expected results but the other values don't. If anyone can assist me with variable substitution it would be appreciated.

Or a method to just provide the Bus Name only instead of "AdminTask.listSIBuses ()".

BUSES = AdminTask.listSIBuses ()
print "Buses: ", BUSES
BUSLIST = BUSES.split(lineSeparator)
for LINE in BUSLIST:
print "Line: ", LINE
RESULT = LINE.find ( BNAME )
#RESULT1 = LINE.find '( '+BNAME+' )'
RESULT2 = LINE.find(BNAME)
#RESULT3 = re.match (BNAME, LINE)
RESULT4 = LINE.find('RealBus')
RESULT5 = LINE.startswith('RealBus')
RESULT6 = LINE.find ('+BNAME+')
#RESULT7 = BNAME in LINE
#RESULT8 = string.find(LINE, BNAME)
RESULT9 = LINE.startswith(BNAME)
print "Result: ", RESULT