python-3.x - 在 ipython 中设置别名
问题描述
目前我正在maestro中调试自己的脚本。问题是我总是必须在 ipython shell 中使用 %run 手动加载所有脚本。
我试图用 alias_magic 设置它,但我不知何故迷路了,因为似乎没有人在 ipython 中设置多行别名。
In [13]: %alias_magic sitemap_gui --cell %run /home/eggerluk/python_code /SiteMapAggregator/philipp_orginal/cfg.py \
...: %run /home/eggerluk/python_code/SiteMapAggregator/ligand_tracker/ligandtracker.py \
...: %run /home/eggerluk/python_code/SiteMapAggregator/gui/sitemapaggregator_utils.py \
...: %run /home/eggerluk/python_code/SiteMapAggregator/philipp_orginal/binding_sites.py \
...: %run /home/eggerluk/python_code/SiteMapAggregator/philipp_orginal/Visualization.py \
...: %run /home/eggerluk/python_code/SiteMapAggregator/philipp_orginal/sitemap_aggregator.py
...:
...: %run /home/eggerluk/python_code/SiteMapAggregator/sitemapaggregator_gui.py
...:
我想用 %sm_gui 执行所有运行命令。
提前致谢。
解决方案
所以,我并没有真正解决我的问题,但我在本教程的帮助下解决了这个问题,并试图理解 python 中导入的概念。我不得不重组一些模块,但现在%run
ipython shell 中的一个命令就可以解决问题。
希望它可以帮助任何人。
推荐阅读
- python - Tkinter - 如何改进“grab_set()”方法的行为?
- python - 通过函数Python传递变量
- python - 如何将 Pandas 中的重复编号列转换为单数、非编号列?
- mongodb - 20 个 mongodbs 服务器集中到只有 1 个
- php - 致命错误:未捕获的错误:类 'App\DB\QueryBuilder'
- r - 如何解释 QQ 图上的 y 轴
- regex - 替换两个字符串之间所有出现的字符
- java - 具有多个登录页面的 Spring Security 只需要订单 1
- css - 仅 CSS 的反向(无)有序列表
- python - 使用线性回归求解两个变量方程