Eclipse下PyDev有没有启动文件之类的东西? [英] Is there such a thing as startup file in PyDev under Eclipse?

查看:54
本文介绍了Eclipse下PyDev有没有启动文件之类的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse 中创建了一个新项目 PyDev.

I have created a new project in Eclipse, PyDev.

如果我在VS2010,我会把一个项目标记为启动项目,每当我点击F5,它就会运行.

If I were in VS2010, I would mark a project as startup project, and whenever I click F5, it runs.

我想将一个 .py 文件标记为我所谓的 Main,并且每次我单击运行 (F11) 时,它将是要运行的文件,而不是当前的正在编辑中.

I want to mark one .py file to be my so called Main, and that each time I click run (F11), it will be the one to run, and not the current that is being edited.

有可能吗?

推荐答案

转到 run ->运行配置

在右侧的菜单中,您应该有 Python Run 选项.双击创建新的运行配置.

In the menu on the right you should have Python Run option. Create new run configuration by double clicking.

在右侧,您可以选择要运行的项目及其主模块.其他选项卡可用于配置参数,用于运行项目的python解释器等.

On the right you can select the project you want to run and it's main module. The other tabs can be used to configure arguments, python interpreter used to run the project, etc..

这篇关于Eclipse下PyDev有没有启动文件之类的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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