当前位置: 首页>>代码示例>>Python>>正文


Python Show.display_admin_message方法代码示例

本文整理汇总了Python中pp_show.Show.display_admin_message方法的典型用法代码示例。如果您正苦于以下问题:Python Show.display_admin_message方法的具体用法?Python Show.display_admin_message怎么用?Python Show.display_admin_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pp_show.Show的用法示例。


在下文中一共展示了Show.display_admin_message方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: wait_for_trigger

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import display_admin_message [as 别名]
    def wait_for_trigger(self):
        
        # wait for trigger sets the state to waiting so that trigger events can do a start_list.
        self.state='waiting'

        self.mon.log(self,self.show_params['show-ref']+ ' '+ str(self.show_id)+ ": Waiting for trigger: "+ self.show_params['trigger-start-type'])

  
        if self.show_params['trigger-start-type'] == "input":
            
            #close the previous track to display admin message
            Show.base_shuffle(self)
            Show.base_track_ready_callback(self,False)
            Show.display_admin_message(self,self.show_params['trigger-wait-text'])

        elif self.show_params['trigger-start-type'] == "input-persist":
            if self.first_list ==True:
                #first time through track list so play the track without waiting to get to end.
                self.start_list()
            else:
                #wait for trigger while displaying previous track
                pass

        elif self.show_params['trigger-start-type'] == "start":
            # don't close the previous track to give seamless repeat of the show
            self.start_list()
            
        else:
            self.mon.err(self,"Unknown trigger: "+ self.show_params['trigger-start-type'])
            self.end('error',"Unknown trigger: "+ self.show_params['trigger-start-type'])
开发者ID:KenT2,项目名称:pipresents-gapless,代码行数:32,代码来源:pp_gapshow.py

示例2: load_first_track

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import display_admin_message [as 别名]
 def load_first_track(self):
     self.mon.trace(self,'')
     if self.medialist.start() is False:
         # list is empty - display a message for 5 secs and then retry
         Show.display_admin_message(self,self.show_params['empty-text'])
         self.canvas.after(5000,self.remove_list_empty_message)
     else:
         # otherwise load the first track
         # print "!!!!! artshow init first"
         self.next_player=Show.base_init_selected_player(self,self.medialist.selected_track())
         if self.next_player is None:
             self.mon.err(self,"Track Type cannot be played by this show: "+self.medialist.selected_track()['type'])
             self.req_next='error'
             self.what_next()
         else:
             # messageplayer passes the text not a file name
             if self.medialist.selected_track()['type'] == 'message':
                 track_file=self.medialist.selected_track()['text']
             else:
                 track_file=Show.base_complete_path(self,self.medialist.selected_track()['location'])
             # print "!!!!! artshow load first ",track_file
             self.next_player.load(track_file,
                                   self.loaded_callback,
                                   enable_menu=False)
             self.wait_for_load() 
开发者ID:athope,项目名称:pipresents-gapless,代码行数:27,代码来源:pp_artshow.py

示例3: start_list

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import display_admin_message [as 别名]
    def start_list(self):
        # starts the list or any repeat having waited for trigger first.
        self.state='playing'

        # initialise track counter for the list
        self.track_count=0
       
        # start interval timer
        self.interval_timer_signal = False
        if self.interval != 0:
            self.interval_timer=self.canvas.after(self.interval*1000,self.end_interval_timer)

        #get rid of previous track in order to display the empty message
        if self.medialist.display_length() == 0:
            if self.show_params['empty-text']:
                Show.base_shuffle(self)
                Show.base_track_ready_callback(self,False)
                Show.display_admin_message(self,self.show_params['empty-text'])
                self.wait_for_not_empty()
            else:
                self.stop_timers()
                self.ending_reason='exit'
                Show.base_close_or_unload(self)                
        else:
            self.not_empty()
开发者ID:drewkeller,项目名称:pipresents-gapless,代码行数:27,代码来源:pp_gapshow.py

示例4: start_list

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import display_admin_message [as 别名]
    def start_list(self):
        # starts the list or any repeat having waited for trigger first.
        self.state='playing'

        # initialise track counter for the list
        self.track_count=0

        # start interval timer
        self.interval_timer_signal = False
        if self.interval != 0:
            self.interval_timer=self.canvas.after(self.interval*1000,self.end_interval_timer)

        #get rid of previous track in order to display the empty message
        if self.medialist.display_length() == 0:

            #Get current mac address
            str     = open('/sys/class/net/eth0/address').read()
            #Remove : from the mac address for ease of reading
            address = re.sub(':', '', str[0:17])
            #Get system ip address
            ipAddr = check_output(["hostname", "-I"]).rstrip()
            #Check for ip
            if ipAddr:
                iptext = "Monitor IP Address: " + ipAddr + "\n"
            else:
                iptext = ""
            #Check for internet connection
            if self.internet_on():
                addtext = "Monitor is connected to the internet"
            else:
                addtext = "Monitor not connected to a network with a internet connection\nPlease connect the monitor to a network with an internet connection\nUse a network cabel or wifi dongle to do so"

            Show.base_shuffle(self)
            Show.base_track_ready_callback(self,False)
            #Show.display_admin_message(self,self.show_params['empty-text'])
            Show.display_admin_message(self,'Monitor has nothing to play\nMonitor Code: ' + address + '\nAdd this monitor to your account to get started\n' + iptext + addtext)
            self.wait_for_not_empty()
        else:
            self.not_empty()
开发者ID:PiSignage,项目名称:PIChannel,代码行数:41,代码来源:pp_gapshow.py


注:本文中的pp_show.Show.display_admin_message方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。