pydev

Unused import warning in Eclipse/PyDev although it is used

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 20:08:37
问题 I am importing a plotting package in my file like this: import matplotlib.pyplot as plt and am using this import later on in my code successfully(!) fig = plt.figure(figsize=(16,10)) However, Eclipse is telling me this: "Unused import: plt Found at: matplotlib.pyplot" There might be a very simple solution for this, but I could not find it on the internet. I am new to Eclipse and PyDev, but there should be some way so that Eclipse recognized pyplot as plt? 回答1: I feel embarrassed. The comments

Pydev error while creating new django project

≡放荡痞女 提交于 2019-12-10 19:47:26
问题 I keep getting this error every time i create a new django project using titanium (eclipse) with pydev. Actually, it did create the file settings.py I wonder what make this error and how to fix it? 回答1: It's really a PyDev issue with Django 1.4. A new release (2.5.0) will be done later this week properly supporting the layout changes in Django 1.4. You can still use the project created this way, but you have to do some manual things: Move the contents inside of the folder that was created to

PyDev: Undefined variable from import: __name__

狂风中的少年 提交于 2019-12-10 19:36:35
问题 I use regularly the __name__ property of classes in my code (which works perfectly in Python) but PyDev is always marking it as an error ( Undefined variable from import ). I tried to add the __name__ to the bulletin imports but this did not remove the problem. When I use auto completion, PyDev finds a __class__ property when typing a . behind a class which is wrong. But if I use __class__ property anyway, PyDev finds the __name__ property. Is there any bug in PyDev that has to do with mixing

re-arrange pythonpath in pydev-eclipse?

柔情痞子 提交于 2019-12-10 18:45:19
问题 I'm using pydev in eclipse. I was hoping that pydev would first use the python classes I develop in my source dir. but since I also install the built egg into system dir, pydev also picks up the classes from system dir. the problem is that pydev uses system dir first in its python path. so after I installed a buggy version, and debug through pydev, and made the necessary changes in local sourcecode, it does not take effect, since the installed egg is not changed. or in the reverse case, as I

PyDev can't debug anymore

心已入冬 提交于 2019-12-10 18:24:19
问题 I'm using eclipse 4.2.1 and pydev 2.7.1 (previously 2.6.0) Everything was working fine, until suddenly the debugger stopped working - it prints "pydev debugger: starting" and then doesn't run the program at all, but just hangs. Based on some information I found in other problem reports, I changed some debug constants (DEBUG_TRACE_LEVEL = 3 and DEBUG_TRACE_BREAKPOINTS = 3) and got this output now: pydev debugger: starting ('Executing file ', '/path/to/my/program.py') ('arguments:', "['/path/to

Pydev and Pylons inside virtual environment, auto completion won’t work

强颜欢笑 提交于 2019-12-10 17:55:44
问题 I have Pydev installed and running without problem with Python 2.6. I installed Pylons 0.9.7 RC 4 into virtual environment, then configured new interpreter to pint into virtual environment and this one is used for pylons project. My problem is that code auto completion does not work for a classes from base library (one that are installed with base python installation), and it works without any problem with classes from virtual environment. TIA 回答1: perhaps this or this would help BTW: I guess

PyDev and Django: Autocomplete not detecting Django?

徘徊边缘 提交于 2019-12-10 17:40:08
问题 I'm using PyDev with Django. The autocomplete works nicely in the shell - I start typing, and it suggests completions. However, this doesn't work in the main code editor window. How can I fix this? I'm using: Eclipse build #20100218-1602 PyDev 1.5.6 Eclipse IDE for Java Devs 1.2.2 回答1: You might need to set the editor code completion settings. They are under: Window->Preferences->PyDev->Editor->Code Completion You might also need to add the Django install or your Django project to your path.

Any idea why F6 wouldn't work?

為{幸葍}努か 提交于 2019-12-10 15:54:44
问题 I've a fairly straight forward installation of eclipse. Started with Eclipse for Java EE development, I added the CDT and PyDev (I cannot recall whether F6 was working before adding these extensions). When debugging, I'm trying to hit the F6 key for step over, and no action takes places. F5 is working fine. Also, the step over button on the Debug view is working fine. Looking at Preferences -> General -> Keys, F6 is bound is 'Step Over' when Debugging as expected. Where can I start

Troubles with PyDev and external libraries in OS X

天大地大妈咪最大 提交于 2019-12-10 15:46:33
问题 I've successfully installed the latest version of PyDev in my Eclipse (3.5.1) under OS X 10.6.3, with python 2.6.1 I have troubles in making the libraries I have installed work. For example, I'm trying to use the cx_Oracle library, which is perfectly working if called from the python interpeter of from simple scripts made with some text editor. But I cant make it work inside Eclipse: I have this small piece of code: import cx_Oracle conn = cx_Oracle.connect(CONN_STRING) sql = "select field

Importing classes from another directory - Python

元气小坏坏 提交于 2019-12-10 15:22:36
问题 Current Location: ProjectName/src Classes Location: ProjectName/Factory Modules/Factory Classes Try 1: from FactoryClass1 import FactoryClass1 Try 2: import sys sys.path.append(path_to_classes_folder) from FactoryClass1 import FactoryClass1 However I keep getting 'ImportError: No module named PointSet'. How should the import statement be written in order to be able on using the functions in the classes? 回答1: You may try something like: import os.path, sys # Add current dir to search path. sys