简体   繁体   English

如何远程运行Python脚本

[英]How to run a Python script remotely

We run many Python scripts for data processing tasks. 我们为数据处理任务运行许多Python脚本。 We have a modeling computer that has been upgraded to provide the best performance for these tasks, but it is shared by many people that all need to run different scripts on it at the same time. 我们有一台已经升级的建模计算机,可以为这些任务提供最佳性能,但许多人都同意这一点,所有人都需要同时运行不同的脚本。

Is it possible for me to run a Python script remotely on that machine from my laptop while others are either directly logged into it or also remotely running a script? 我可以从笔记本电脑远程在该机器上运行Python脚本,而其他人可以直接登录到它还是远程运行脚本吗?

Is SSH a possibility? SSH有可能吗? I haven't ever run any scripts remotely aside from logging in via remote desktop. 除了通过远程桌面登录之外,我还没有远程运行任何脚本。 Ideally, I could start the Python script on that remote machine, but all the messages would be visible to me on my laptop. 理想情况下,我可以在该远程计算机上启动Python脚本,但在我的笔记本电脑上可以看到所有消息。 Does this sound doable? 这听起来有用吗?

EDIT: 编辑:

I forgot to mention all machines are running Windows 7. 我忘了提到所有运行Windows 7的机器。

SSH is definitely the way to go and also have a look at Fabric . SSH肯定是要走的路,也看看Fabric

Regarding your edit. 关于你的编辑。 You can use Fabric on Windows . 您可以在Windows上使用Fabric And I think that using SSH on Windows will be a bit easier than dancing with their Powershell's remoting capabilities . 我认为在Windows上使用SSH比使用Powershell的远程处理能力跳舞要容易一些。

SSH does seem like it should meet your needs. SSH似乎应该满足您的需求。

You could also consider setting up an iPython notebook server that everyone could use. 您还可以考虑设置一个每个人都可以使用的iPython笔记本服务器

Its got nice parallel processing capabilities if you are doing some serious number crunching. 如果你正在做一些严重的数字运算,它有很好的并行处理能力

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM