Python工作流如RStudio? [英] Python Workflow like RStudio?

查看:486
本文介绍了Python工作流如RStudio?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Python作为我的主要编程语言,有时会切换到R来进行快速数据分析任务,因为它是用于统计编程目的的庞大库(尽管 pandas 很棒!)。我想大多数R-Users都会选择 R-Studio ,就像R的IDE一样。数百个用于Python的IDE,但我想坚持使用VIM和IPython。虽然有 vim-ipython -plugin,但我无法重新创建R-Studio工作流程,主要是:

I use Python as my main programming language, sometimes switching to R for quick data-analysis tasks due to it’s huge library for statistical programming purposes (although pandas for python is great!). I guess that most R-Users go for R-Studio, which is like an IDE for R. There are probably hundreds of IDE’s for Python, but i’d like to stick with VIM and IPython. Although there is the vim-ipython-plugin, i can’t recreate the R-Studio workflow, which is mainly:


  1. 在源代码编辑器中编写代码

  2. push或执行它在控制台窗口中通过CTRL-Enter

  3. 之后,结果将显示在控制台窗口或绘图窗口中

使用vim-ipython插件时,可以通过CTRL-S执行vim-lines,但运行的IPython-Kernel / QTconsole中的结果不会更新。相反,输出直接进入VIM窗口(< leader> s 打开它,但窗口一直关闭,无法显示内嵌图形,像ipython-qtconsole那样)。

When using the vim-ipython plugin, you can execute vim-lines via CTRL-S, but the results in the running IPython-Kernel/QTconsole are not updating. Instead, the output goes directly to a VIM window (<leader>s opens it, but the window closes all the time and isn´t able to display inline-graphics, like the ipython-qtconsole does).

我确定这不是一个新的问题,但有任何VIM设置和(I)Python,它模仿RStudio行为并整合两者编辑器和现代IDE的交互式解释器呢?将文本从vim复制到交互式解释器不是最佳解决方案,对吗?

I’m sure this isn’t a new "problem", but is there any setup for VIM and (I)Python, which mimics the RStudio behavior and integrates both the editor and the interactive interpreter like modern IDE’s do? Copying text from vim to the interactive interpreter can’t be the optimal solution, right?

推荐答案

这样做的规范方法vim是在 gnu-screen tmux 在会话的第二个屏幕中与REPL会话。然后,您可以使用 vim-slime 将代码从vim发送到REPL。

The canonical way of doing this in vim is to run vim inside a gnu-screen or tmux session with the REPL in a second screen in the session. You can then use vim-slime to send code from vim to the REPL.

这篇关于Python工作流如RStudio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆