pydev

Is there such a thing as startup file in PyDev under Eclipse?

吃可爱长大的小学妹 提交于 2019-12-13 18:55:50
问题 I have created a new project in Eclipse, PyDev. If I were in VS2010, I would mark a project as startup project, and whenever I click F5, it runs. 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. Is it possible? 回答1: Go to run -> run configurations In the menu on the right you should have Python Run option. Create new run configuration by double clicking. On the right you can select

ImportError: cannot import name urandom Eclipse/PyDev

不想你离开。 提交于 2019-12-13 18:26:39
问题 I know this question has been asked many times, but I couldn't manage to solve it on my own. So please bear with me. Traceback (most recent call last): File "/Users/someone/Desktop/eclipse/plugins/org.python.pydev_2.6.0.2012062818/pysrc/pydevd.py", line 3, in <module> import pydev_imports File "/Users/someone/Desktop/eclipse/plugins/org.python.pydev_2.6.0.2012062818/pysrc/pydev_imports.py", line 14, in <module> from _pydev_SimpleXMLRPCServer import SimpleXMLRPCServer File "/Users/someone

Python multiprocessing pipe will not recv() properly in PyDev, works fine anywhere else

纵饮孤独 提交于 2019-12-13 18:00:46
问题 This is from another question I had. I discovered that this error only occurs in PyDev. If I run the code from the command line or from IDLE, the proper output is produced. In PyDev, nothing happens: This is for Python 3.2.2, Eclipse 3.7.2: from multiprocessing import Pipe, Process def f(r): print(r.recv()) if __name__ == '__main__': q, r = Pipe() p = Process(target=f, args=(r,)) p.start() q.send([42, None, 'hello']) p.join() The main thread creates a new Process , p , and sends r , a

Speedup pydev debugging on python 2.6+

送分小仙女□ 提交于 2019-12-13 16:28:12
问题 PyDev reports it can use psyco to speed its debugger. However the most up-to-date psyco build I found for windows was for python 2.5. Is there a way to speed-up pydev debugging, either with or without psyco, with newer 2.x versions such as 2.6 and 2.7? In this relevant yet unanswered question there's a reference to pypy, could that be encorporated somehow? 回答1: Yes, unfortunately, psyco seems unsupported at this time (its main developer went to work on pypy). Pypy itself seems like a good

Can't get Coverage to work in PyDev, “File has no statistics”

你说的曾经没有我的故事 提交于 2019-12-13 16:15:32
问题 I can't get Coverage to work with PyDev. Every file I run shows up with: "File has no statistics." I'm following the instructions by checking 'Enable code coverage for new launches', and dragging the folder to analyze over to the Code Coverage window. I've successfully installed coverage. After that, I refreshed my Python Interpreter settings, where the coverage folder shows up automatically. I've also tried to add the coverage folder to my project's External Libraries. Didn't work either...

Multiple installs of Python on MacOSX for Eclipse

十年热恋 提交于 2019-12-13 15:22:43
问题 I want to have multiple installs of Python: 2.1, 2.4, 2.7, 3.x My IDE is Eclipse (Helios)/Pydev on MacOSX, which works great. I have a couple of Python codebases that are/will be running on different versions of Python. Also, I like Eclipse PyDev's crosslinking from source-code to documentation. The standard recommendation seems to be: use virtualenv, and keep the installs totally separate from the builtin MacPython (2.6.1). Eclipse should never be pointing to the MacPython install. (Should

Is there a way to change the default encoding for all run configurations within Pydev?

徘徊边缘 提交于 2019-12-13 13:55:04
问题 There has been some discussion of the merits or demerits/evilness of using sys.setdefaultencoding(...) in python 2.x I'm using PyDev and I want to have the default 'out of the box' python behaviour (US-ASCII as default (non-)encoding), as I feel this is safer (I don't like the site_customize.py approach), even if more laborious. When I'm using PyDev (particularly for running unittests) it be defaults calls sys.setdefaultencoding('UTF-8'). Other answers have recommended changing the encoding

Python suddenly has error: “No module named unittest.” I'm not running a unit test

风格不统一 提交于 2019-12-13 08:38:30
问题 I have a Django application, which very suddenly started giving me an error. I made a code change, restarted the application, and now I can't get rid of this error. I really don't think that I did anything else in between the two runs. The error is ImportError: "No module named unittest" I don't know if it thinks it should be running a unit test or if this just happens to be the first thing to fail. I have tried running it both from Eclipse and from the CMD line with manage.py runserver. Same

Why Eclipse Pydev uses @author in default template

爱⌒轻易说出口 提交于 2019-12-13 07:55:48
问题 I have been intrested for python documenting for a while but I can't figured out why @author is default sytnax in python templates. Why it isn't :author: (in restructuredtext style)? From what reason is used syntax with @ and not with : I though that restructuredtext is most common in python world. 回答1: The Epytext Markup language is what you're looking for. It is epydoc's language. It makes use of the @ prefix, with such words as param , type , return , raise , etc. 来源: https://stackoverflow

pydev debugger not working but can run code fine

 ̄綄美尐妖づ 提交于 2019-12-13 03:49:20
问题 I am using Liclipse which is basically pydev with eclipse. The python file runs fine but when I try to use the pydev debugger on the same file the debugger fails to launch and I couldn't find anything about this error. Is it a bug in pydev? It even says "During handling of the above exception, another exception occurred" I am using python 3.7.1 warning: Debugger speedups using cython not found. Run '"C:\Users\q4116\AppData\Local\Programs\Python\Python37-32\python.exe" "C:\Program Files