Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def queryNormalChannels(input_item_id,input_channel_name=''):
- """This function queries channels and returns True-False, the name of the channel,
- Total number of channels and the names of the channels
- (channel_success?, selected_channel_number[],selected_channel_name[],channel_list[])
- """
- #Kursad Karatas 2009
- try:
- lx_ItemName=lx.eval("query sceneservice item.name ? %s" %input_item_id)
- lx_number_channel=lx.eval("query sceneservice channel.N ?")
- lx.out("FUNC CALL: number of channels",lx_number_channel)
- lx_selected_channel_name=' '
- channel_list=[]
- selected_channel_name=[]
- selected_channel_number=[]
- for iterChannel in xrange(lx_number_channel):
- # lx.eval("select.channel %s add " %lx_item_channels_name)
- if input_channel_name=='':
- lx_item_channels_name=lx.eval("query sceneservice channel.name ? %s" %iterChannel)
- lx_sel_channel_status=lx.eval("query sceneservice channel.isSelected ? %s" %lx_item_channels_name)
- else:
- lx_item_channels_name=input_channel_name
- if lx_sel_channel_status:
- lx.out("lx_sel_channel_status is ",lx_sel_channel_status)
- channel_success=lx_sel_channel_status
- selected_channel_number.append(iterChannel)
- selected_channel_name.append(lx_item_channels_name)
- lx.out(type(selected_channel_name),"Selected channel name",lx_item_channels_name)
- channel_list.append(lx_item_channels_name)
- return channel_success, selected_channel_number,selected_channel_name,channel_list
- except:
- lx.out('Exception "%s" on line: %d' % (sys.exc_value, sys.exc_traceback.tb_lineno))
Add Comment
Please, Sign In to add comment