def main():
opts = command_line()
print('Connecting...')
client = create_client_from_config(opts)
print('Connected.')
banner = '\nIMAPClient instance is "c"'
def ipython_011(c):
from IPython.frontend.terminal.embed import InteractiveShellEmbed
ipshell = InteractiveShellEmbed(banner1=banner)
ipshell('')
def ipython_010(c):
from IPython.Shell import IPShellEmbed
IPShellEmbed('', banner=banner)()
def builtin(c):
import code
code.interact(banner, local=dict(c=c))
for shell_attempt in (ipython_011, ipython_010, builtin):
try:
shell_attempt(client)
break
except ImportError:
pass
评论列表
文章目录