pydev

PyDev Undefined variable from import error

自古美人都是妖i 提交于 2019-12-08 22:38:53
问题 I'm using virtualenv for Django project. From command line I can import modules hashlib and zipfile. But PyDev is reporting unresolved import for those two. (os, sys and email are working). When I copy zipfile.py and zipfile.pyc (and same for hashlib) to virtualenv lib's folder I can import modules, but I get errors that md5 variable isn't defined in hashlib and so on. Again, I can call md5 method within virtualenv in command line... What Can I do? 回答1: Window -> Preferences -> PyDev ->

Set default directory of Pydev interactive console?

孤人 提交于 2019-12-08 17:06:12
问题 The interactive console (aka PyDev console) which I use to run scripts with Control + Alt + Enter loads with C:\Program Files (x86)\eclipse as the default directory. How can I make it load to the default working directory that the script or project is located in? I've been researching this all over now and nothing seems to work. It looks like others have been having the same issues with no answers too: pydev console path for the active editor https://superuser.com/questions/486759/how-can-i

PyDev code analysis missing

被刻印的时光 ゝ 提交于 2019-12-08 15:30:52
问题 I have installed Eclipse 3.7.2 from APT in Ubuntu 12.04, and installed PyDev in Eclipse. First, it warns unused import and unused wild import, but it no longer displays them today. However, it can display errors like missing parenthesis. I created a new user, and installed PyDev using that user, problem still happens. How can I enable them for warnings? I have not change the code analysis settings. 回答1: list all operations could solve it here, for others convenience, and make this question

PyDev bugs with imports

馋奶兔 提交于 2019-12-08 14:50:23
问题 I am using PyDev/Eclipse for several monthes and I get ever and ever the same bugs with imports: PyDev underline in red an import and say Unresolved import xxx ; Found at yyy . When I click on yyy eclispe find and open the implementation of the module. (PyDev just inform me that it can't find the module xxx and in the same message that it can find it !) The module xxx is in the PYTHONPATH of eclipse. When I "explore" the interpreter of the project, I can find it without any problems. When I

Automatically Terminating Previously Running Python Interprets when Relaunching in Eclipse

你离开我真会死。 提交于 2019-12-08 12:28:43
问题 Is there an option for the Eclipse plugin Pydev which would cause Pydev to automatically terminate any already running python instances when a new python instance is launched? There is an option in Preferences --> Run/Debug --> General Options --> Remove terminated launches when new launches are created I would need an option of the type: "Terminate and Remove all launches when new launches are created" 回答1: Sort of... you can do the following: do a regular launch and take a look at the

Unresolved import errors yet successful import still occurs

[亡魂溺海] 提交于 2019-12-08 09:10:36
问题 I am working on a project in Eclipse Juno. I wrote a class called Character in a package named chargen.py. There's a red X next to from chargen import Character : Unresolved import: Character Character Found at: Avarice_v0.PlayAvarice_v0 from chargen import Character Yet the import works. The entire code at the moment is simply this: from chargen import Character def main(): PLAYER = Character("") print(PLAYER) if __name__ == '__main__': main() This code results in the printing of the __str__

Matlab script not found from django views.py

我的未来我决定 提交于 2019-12-08 08:47:30
问题 I have a user-made Matlab script in the same directory as my views.py page, but when it is called I receive the error: Undefined function 'getRecs' for input arguments of type 'double'. Basically the script wasn't found. When I test the script with a test.py script in the same directory everything works fine, but when called through the views.py via my browser and the development server the error appears. tools.py: def get_recs(passed_list): eng = matlab.engine.start_matlab() recs = eng

How to debug Django unittests with PyDev? [duplicate]

◇◆丶佛笑我妖孽 提交于 2019-12-08 08:32:26
问题 This question already has an answer here : How to run django tests in Eclipse to make debugging possible, but on test database (1 answer) Closed 2 years ago . i've written a few unittests for a Django project. I'd like to debug them. I've set a break point on the server side. what should I click to run the Django unittest with debugging enabled in PyDev Eclipse? It seems I can run the manage.py test command from Pydev, but then there's no debugging. If I run the unittest with right-click

How to make PyDev Debug Console Interactive?

喜夏-厌秋 提交于 2019-12-08 07:18:55
问题 PyDev offers both a debug console as well as an interactive console. However, I am still not able to execute interactive commands such as %timeit in the debug console. How can I make the debug console interactive? 回答1: You can't currently make the debug console an IPython interactive console -- you can have a "regular" interactive console by right-clicking a stack-frame in the Debug view > PyDev > Debug Console , but it's not really an interactive console with IPython support. Starting an

Debugging Fabfile's Using An IDE

徘徊边缘 提交于 2019-12-08 06:20:27
I would like to be able to debug a fabric file, but for some reason when I run/debug my fabfile.py using my IDE, nothing seems to happen. I see status messages that a debug process is starting, but it just ends and there is no output in my debug console. I have tried this with Wing IDE and PyDev/Eclipse to no avail. Here is how I ended up setting this up using PyCharm. I did this with the professional version but I think this would work with the free community edition as well. If you try it, please let us know. As with most things like this, once you know the magic settings, it was very easy.