同步操作将从 北京师范大学-傅骞/mixly3 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
from __future__ import print_functionfrom IPython.core.magic import Magics, line_magic, magics_class # type: ignorefrom IPython.core.magic_arguments import (argument, magic_arguments, # type: ignoreparse_argstring) # type: ignorefrom .main import find_dotenv, load_dotenv@magics_classclass IPythonDotEnv(Magics):@magic_arguments()@argument('-o', '--override', action='store_true',help="Indicate to override existing variables")@argument('-v', '--verbose', action='store_true',help="Indicate function calls to be verbose")@argument('dotenv_path', nargs='?', type=str, default='.env',help='Search in increasingly higher folders for the `dotenv_path`')@line_magicdef dotenv(self, line):args = parse_argstring(self.dotenv, line)# Locate the .env filedotenv_path = args.dotenv_pathtry:dotenv_path = find_dotenv(dotenv_path, True, True)except IOError:print("cannot find .env file")return# Load the .env fileload_dotenv(dotenv_path, verbose=args.verbose, override=args.override)def load_ipython_extension(ipython):"""Register the %dotenv magic."""ipython.register_magics(IPythonDotEnv)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。