コード例 #1
0
import screen


screen.start()
コード例 #2
0
ファイル: ui_form.py プロジェクト: thisispoker/screenshot
 def work(self):
     image_processing.check_is_folder_exist()
     while not self.wait:
         screen.start()
コード例 #3
0
ファイル: wx_Ui.py プロジェクト: ctac1412/screenshot
 def run(self):
     """Run Worker Thread."""
     # This is the code executing in the new thread.
     screen.start()
     wx.CallAfter(
         lambda: pub.sendMessage('screen.end', msg="Thread finished!"))
コード例 #4
0
cdn_list = cdn.CdnList()
cdn_list.add_cdn(
    cdn.Cdn(connection.speed * 0.8,
            "fast"))  # Fast CDN, with max speed of 80% of our connection
cdn_list.add_cdn(
    cdn.Cdn(connection.speed * 0.5,
            "normal"))  # Normal CDN, with max speed of 50% of our connection
cdn_list.add_cdn(
    cdn.Cdn(connection.speed * 0.2,
            "slow"))  # Slow CDN, with max speed of 20% of our connection
cdn_list.add_cdn(
    cdn.Cdn(connection.speed * 0.01,
            "glacier"))  # Glacier CDN, with max speed of 1% of our connection

downloader = downloader.Downloader(cdn_list, connection, game,
                                   35)  # create downloader
downloader.optimizer = optimize.NaiveMeanChunkDownloadTimeOptimizer(
)  # add optimizer

screen = screen.Screen(downloader)
screen.start()  # start screen timer

while game.get_remaining_chunks_count():
    bytes = downloader.tick()

    screen.tick(bytes)
    time.sleep(0.001)  # sleep for better presentation

screen.finish()  # print summary