如何将 python 模块加载到 Komodo 中的新交互式 shell 中?

发布于 2024-07-06 04:08:10 字数 272 浏览 6 评论 0原文

使用 PyWin 时,我可以轻松地将 python 文件加载到新的交互式 shell 中,我发现这对于原型设计和其他探索性任务非常方便。

我想使用 Komodo 作为我的 python 编辑器,但我还没有找到替代 PyWin 重新启动 shell 并重新加载当前模块的功能。 我怎样才能在科莫多做到这一点?

对我来说也非常重要的是,当我重新加载时,我会得到一个新的外壳。 如果我以前的交互位于 shell 历史记录中,我会更喜欢它,但对我来说更重要的是,内存与以前的版本和尝试隔离。

When using PyWin I can easily load a python file into a fresh interactive shell and I find this quite handy for prototyping and other exploratory tasks.

I would like to use Komodo as my python editor, but I haven't found a replacement for PyWin's ability to restart the shell and reload the current module. How can I do this in Komodo?

It is also very important to me that when I reload I get a fresh shell. I would prefer it if my previous interactions are in the shell history, but it is more important to me that the memory be isolated from the previous versions and attempts.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

喵星人汪星人 2024-07-13 04:08:10

我使用 Komodo Edit,它可能比完整的 Komodo 稍微复杂一些。

我创建一个“新命令”,并将 %(python) -i %f 作为命令文本。 我在“新控制台”中运行了这个。 我通常将起始目录设置为 %p,即项目目录的顶部。

-i 选项运行该文件并放入交互式 Python 中。

I use Komodo Edit, which might be a little less sophisticated than full Komodo.

I create a "New Command" with %(python) -i %f as the text of the command. I have this run in a "New Console". I usually have the starting directory as %p, the top of the project directory.

The -i option runs the file and drops into interactive Python.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文