pydev

Linux下 PyDev + Eclipse安装方法

不问归期 提交于 2020-02-09 03:50:45
最近在学习Python,想把开发环境弄起来,网上找了PyDev + Eclipse的安装方法,但总是不奏效,经过各种失败后,终于成功,现将经验总结如下。 一、安装Eclipse 1.安装Jdk/Jre环境 Eclipse 是运行于Java虚拟机中的,所以必须先安装Java环境才能进行开发测试。JRE(Java Runtime Environment)是运行环境,JDK(Java Development Kit)是开发环境,JDK开发环境中包括JRE运行环境。所以如果只是使用Eclipse开发PHP程序,JDK不是必须的,JRE即可;如果同时也要进行Java语言的开发,那么JDK才是必须的。 在Ubuntu中安装了JDK就不用再安装JRE了,如安装了JRE,再安装JDK会重新再装一个JRE。打开Ubuntu终端,使用命令: sudo apt-get install sun-java6-jre //安装jresudo apt-get install sun-java6-jdk //安装jdk 我使用的是linuxmint,默认已经安装好jdk和jre了。 参见: http://farlee.info/archives/ubuntu-linux-eclipse-pdt-jdk-jre-php.html 2.下载Eclipse Eclipse下载地址: http://www.eclipse

Pydev source file hyperlinks in Eclipse console

此生再无相见时 提交于 2020-01-30 12:04:10
问题 When a python app crashes the console displays hyperlinks to the source code where the exceptions occurred. You just click the link and your source file is opened in the Eclipse editor. I have my own exception handler and would like to put links to source files in the console when my apps crash. I have looked for info on this a few times and cannot see how to do it or if it is possible at all. It seems that it can be done in java by writing to the console in the form ':' - A listener picks

Pydev source file hyperlinks in Eclipse console

五迷三道 提交于 2020-01-30 12:01:11
问题 When a python app crashes the console displays hyperlinks to the source code where the exceptions occurred. You just click the link and your source file is opened in the Eclipse editor. I have my own exception handler and would like to put links to source files in the console when my apps crash. I have looked for info on this a few times and cannot see how to do it or if it is possible at all. It seems that it can be done in java by writing to the console in the form ':' - A listener picks

Autocompletion in Django + pydev

主宰稳场 提交于 2020-01-24 16:45:06
问题 I am trying to make pydev autocomplete my variables from model data, but for now I have been unable to do it. I have configured the PYTHONPATH in Window->Preferences->PyDev->Interpreter - Python to include both the django folder and my project folder. Then if I have a model like this: class Team(models.Model): name = models.CharField(max_length=50) id = models.IntegerField() and from another file of the same django project I import this file from MyProject.MyApp.models import Team Code

Connecting python 3.3 to microsoft sql server 2008

柔情痞子 提交于 2020-01-24 01:43:21
问题 I am new to python. I am using Pydev IDE with Eclipse for python programming in my Windows machine. I am using python 3.3 vern and want to connect with MS Sql Server 2008. Could someone suggest how should I connect with MS Sql Server 2008. 回答1: pyodbc supports python3 and can connect to any databas for wich there's an odbc driver, including sql server. There's also a pure python implementation pypyodbc which also should supoort python3. adodbapi also claims to work with python3. Here you can

Why does Eclipse want incoming network connections (using OS X)?

孤街醉人 提交于 2020-01-23 09:32:50
问题 Does anyone know why Eclipse is asking for incoming network connections? I searched around and saw mentions of Code Completion with PyDev, but I disabled code completion in PyDev, restarted, and was still prompted for incoming network connections. 回答1: PyDev spawns a shell and connects to it to request information on builtin modules (besides using it to debug a process). I.e.: The shell is spawn at https://github.com/fabioz/Pydev/blob/master/plugins/org.python.pydev/src_completions/org/python

Mac下的Eclipse安装PyDev插件

元气小坏坏 提交于 2020-01-20 18:24:47
因为之前学习java的时候一直使用eclipse,现在较为习惯使用eclipse。因此最近在学习python的时候,不想再安装其他的IDE,就想着直接在eclipse中配置PyDev插件就可以愉快学习python了。 1、下载PyDev插件 找到eclipse——Help——Install New Software选项 点击add,name自定义,location输入http://pydev.org/updates,点击add 等出现如下图所示时,选择PyDev即可 然后一路next,知道finish就算安装完成。然后重启eclipse之后,在左上角eclipse——preferences下,我们就能发现多了一个PyDev项。 2、配置PyDev: 安装好PyDev之后我们还暂时不能编译python代码,我们还需要配置python的编译环境。 找到eclipse——preferences—— PyDev——Interpreters——Python Interpreter,点击右上角的Browse for python/python.exe 然后给所要添加的python解释器命名,输入python的安装目录,点击ok即可。 因为我已经安装过了,所以ok显示灰色。 注意mac下的python安装目录默认为: /Library/Frameworks/Python.framework

What is pyximport and how should I use it?

落爺英雄遲暮 提交于 2020-01-19 05:37:08
问题 I am using cython to generate faster code for a mathematical model. I am having a hard time compiling the code, but somehow I managed to do so using a .bat: setlocal EnableDelayedExpansion CALL "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /release set DISTUTILS_USE_SDK=1 C:\Python27\python.exe C:\gcsilve\trunk\myproject\myproject\cythonsetup.py build_ext --inplace PAUSE It runs ok... My question is regarding pyximport. I have old code written by someone else that uses

Cant Run Google appengine python app on eclipse although launcher works fine

╄→尐↘猪︶ㄣ 提交于 2020-01-17 02:19:09
问题 I'm following this tutorial: http://www.mkyong.com/google-app-engine/google-app-engine-python-hello-world-example-using-eclipse/ I created a project and tried to run it locally. It didn't work but when I ran it on the Google appengine launcher it worked just fine. I noticed that eclipse doesn't create .project and .pydevproject files in the project here is the console contents: WARNING 2012-11-28 07:48:10,265 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library

Subprocess crashes unexpectedly from PyDev, works fine from double click in windows explorer

百般思念 提交于 2020-01-16 18:09:49
问题 I've spent quite a bit of time trying to figure this out. I'm trying to invoke this line to run abaqus (an FEA program): popen = subprocess.Popen(callCommand, cwd=workDir, creationflags=subprocess.CREATE_NEW_CONSOLE) popen.wait() When double clicking on the .py file everthing works fine. However on running it from Eclipse, Abaqus crashes: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Then later