在 Eclipse 中终止 Flask 的内部服务器 (Aptana Pydev) [英] Terminating Flask's Internal Server in Eclipse ( Aptana Pydev)

查看:24
本文介绍了在 Eclipse 中终止 Flask 的内部服务器 (Aptana Pydev)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 eclipse Luna 中使用 Aptana 插件.Pydev 已经存在于 Aptana 中.

I am using Aptana plugin in eclipse Luna. Pydev is already there in Aptana.

我正在使用flask 的内部网络服务器(Werkzeug/0.10.1 Python/2.7.6) 进行flask 开发.

I am doing flask development using flask's internal web server (Werkzeug/0.10.1 Python/2.7.6).

当我运行我的项目时一切顺利,但当我终止运行时,我的应用服务器保持活动状态.

When i run my project everything goes well but when i terminate run, my app server remain active.

它继续提供服务,当我再次运行我的项目时,它会出现以下套接字错误.

It keeps serving and when i run my project again it gives me following socket error.

socket.error: [Errno 98] 地址已被使用

socket.error: [Errno 98] Address already in use

以前我在没有 aptana 的情况下使用 pydev,它工作正常.现在每次运行我都手动杀死进程,这很烦人.

Previously i was using pydev without aptana and it was working fine. Now for every run i am killing process manually which is very annoying.

我正在使用 ubuntu 和 virtualenv.

I am using ubuntu and virtualenv.

我怎样才能克服这个问题?

How can i overcome this issue ?

谢谢

推荐答案

我在阅读这篇文章后找到了解决方案 线程.

I found solution after reading this thread.

技巧是在运行您的应用程序时传递 use_reloader=False.

Trick is while running your application pass use_reloader=False.

    app.run("0.0.0.0", 5051, debug=True, use_reloader=False)

这篇关于在 Eclipse 中终止 Flask 的内部服务器 (Aptana Pydev)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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