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


Python Stream.start方法代码示例

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


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

示例1: main

# 需要导入模块: from stream import Stream [as 别名]
# 或者: from stream.Stream import start [as 别名]
def main(argv):
    if len(argv) < 2:
        print("usage: python server.py [port]")
        return 1
    port = int(argv[1])
    stream = Stream(port)
    stream.accept_incoming_connections()
    stream.start()
开发者ID:kahns729,项目名称:comp112-final-project,代码行数:10,代码来源:server.py

示例2: select_stream_from_entry

# 需要导入模块: from stream import Stream [as 别名]
# 或者: from stream.Stream import start [as 别名]
    def select_stream_from_entry( self ):

        """
            Gets the values from the ui elements, and executes the program in json mode, to determine if the values are valid
        """
        url = self.get_complete_url()
        split_url = url.split()

        self.messages_ui.append( 'Trying to open stream: {}'.format( url ) )

        stream = Stream( split_url )

        stream.start( self.messages_ui )
开发者ID:ckorn,项目名称:livestreamer-ui,代码行数:15,代码来源:main.py

示例3: select_stream_from_link

# 需要导入模块: from stream import Stream [as 别名]
# 或者: from stream.Stream import start [as 别名]
    def select_stream_from_link( self, tableWidgetItem ):

        row = tableWidgetItem.row()

        urlItem = self.links_ui.item( row, 0 )  # the url is in the first column

        url = urlItem.text()

        split_url = url.split()

        self.messages_ui.append( 'Trying to open stream: {}'.format( url ) )


        stream = Stream( split_url )

        stream.start( self.messages_ui )
开发者ID:ckorn,项目名称:livestreamer-ui,代码行数:18,代码来源:main.py

示例4: main

# 需要导入模块: from stream import Stream [as 别名]
# 或者: from stream.Stream import start [as 别名]
def main():
  # If all else fails,
  socket.setdefaulttimeout(60)

  sys.stderr.write("Griffonbot starting up...\n")
  log = Log(config.log)

  log.debug("Main: Setting up...")
  bot = IRCBot(config.irc, log)

  if config.twitter.enable:
    stream = Stream(config.twitter, bot.queue_message, log)

  if config.mail.enable:
    mail = Mail(config.mail, bot.queue_message, log)

  if config.stdin.enable:
    stdin = Stdin(config.stdin, bot.queue_message, log)

  log.info("Main: Starting...")
  bot.start()

  if config.twitter.enable:
    stream.start()

  if config.mail.enable:
    mail.start()

  if config.stdin.enable:
    stdin.start()

  log.debug("Main: Now waiting...")
  wait()

  log.notice("Dead: Exiting...")
  sys.exit(1)
开发者ID:fone4u,项目名称:apexbot,代码行数:38,代码来源:main.py


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