pydev

How to remove lines from stdout in Python - in SciTe, Idle, Eclipse or other editor with console

删除回忆录丶 提交于 2019-12-20 04:38:42
问题 For a standard Python Console window, you can remove the last line with for example sys.stdout.write('\r'+' '*len(line)) as I explained here. But for editors like SciTe, Idle or Eclipse (with PyDev), the stdout is a file-type object, probably flushing its content to the console window leaving its buffer empty and thus not allowing modify the content once it has appeared on in the window. What trick can be applied to, for example, erase the last line of such console? Is there a one-size-fits

Eclipse, PyDev and Python configuration error

守給你的承諾、 提交于 2019-12-20 00:00:56
问题 I decided to try to work with Eclipse and PyDev instead of IDLE. I successfully "installed" Eclipse SDK 3.7. After that, I followed the steps displayed on the PyDev website and successfully installed the plugin. However, when trying to configure my interpreter (Python 3.2.3), I always get an error, and don't know how to fix this. I cannot configure it neither automatically nor manually, and there is no reference to this error on the PyDev website. When trying to configure it automatically,

Eclipse, PyDev and Python configuration error

人走茶凉 提交于 2019-12-20 00:00:43
问题 I decided to try to work with Eclipse and PyDev instead of IDLE. I successfully "installed" Eclipse SDK 3.7. After that, I followed the steps displayed on the PyDev website and successfully installed the plugin. However, when trying to configure my interpreter (Python 3.2.3), I always get an error, and don't know how to fix this. I cannot configure it neither automatically nor manually, and there is no reference to this error on the PyDev website. When trying to configure it automatically,

Eclipse pydev auto-suggestions don't work in some cases

﹥>﹥吖頭↗ 提交于 2019-12-19 06:37:31
问题 My question is probably stupid and I hope somebody has succeeded in solving this issue. Sometimes I cannot see right suggestions in auto-completion box (Eclipse 3.5.2, PyDev 1.5.7). For example: import email fp = open('my.eml', 'rb') msg = email.message_from_file(fp) msg now is a Message object. And functions like get_payload() works fine. msg.get_payload() But I don't get get_payload() in auto-completion list. I think PyDev has no idea of what msg is, so it doesn't know what to show. Maybe I

Pydev and *.pyc Files

谁说我不能喝 提交于 2019-12-19 06:23:52
问题 I am using Eclipse 4.2.1 with the pydev Plugin (version 2.7.1) for python development. It seems that pydev has problems with precompiled python files (*.pyc files). I am using a package which is only provided with such precompiled files. When importing a module, pydev shows "unresolved import" error. And also tool tips are not provided for such precompiled modules. But the code can be executed without any errors. Is there any way to "teach" pydev, how to deal with *.pyc files? 回答1: It seems

Pydev and *.pyc Files

强颜欢笑 提交于 2019-12-19 06:22:54
问题 I am using Eclipse 4.2.1 with the pydev Plugin (version 2.7.1) for python development. It seems that pydev has problems with precompiled python files (*.pyc files). I am using a package which is only provided with such precompiled files. When importing a module, pydev shows "unresolved import" error. And also tool tips are not provided for such precompiled modules. But the code can be executed without any errors. Is there any way to "teach" pydev, how to deal with *.pyc files? 回答1: It seems

PyDev/Eclipse not loading _mklinit when run from a Conda environment

会有一股神秘感。 提交于 2019-12-19 04:02:41
问题 I created a conda environment - testenv2 - installed python/numpy/pandas. Added it as the interpreter in Eclipse project settings and using it to run my test python script. And I am getting the below error. The same test script works fine from command line when I activate the conda environment and run from with in it. It also works from PyCharm. But somehow fails to launch in Eclipse. Traceback (most recent call last): File "C:\Data\projects\eclipse-workspace\PythonEclipse\Test.py", line 1,

PyDev for Eclipse - Resolve Python dependencies (unresolved imports)

拟墨画扇 提交于 2019-12-18 14:57:15
问题 I am using PyDev for Eclipse as my IDE and pip as my package management tool, running virtualenv. Every time I want to use/include some new libraries or new dependencies in my project, I add them into the pip-requires file. The dependencies are installed in my virtual environment with no problem after running pip install -r pip-requires . My Env : Ubuntu 12.04 PyDev for Eclipse 2.7.1.2012100913 Python 2.7.3 Eclipse indigo Update: My Pydev Setup : Questions: eclipse/pydev knows nothing about

Pydev Not Recognized in Eclipse

我是研究僧i 提交于 2019-12-18 14:07:28
问题 I've been using PyDev within Eclipse on my Mac for about two years now. Updated Eclipse today, and suddenly PyDev is completely missing. Tried everything, included a complete uninstall and fresh install, but although PyDev shows up as installed in the menu, it appears nowhere else. PyDev version: 3.0.0.201311051910 Eclipse: Version: Kepler Service Release 1 Build id: 20130919-0819 I can't open a PyDev perspective, I can't create a new Python file, and I can't open an existing Python file

Displaying function documentation in PyDev

我只是一个虾纸丫 提交于 2019-12-18 12:49:41
问题 I've gotten Pydev up and running, and almost all is working well. However I'm having some trouble with docstrings. Let's say for instance I have a function such as the following: def _get_logging_statement(self): """Returns an easy to read string which separates items in the log file cleanly""" result = "\n\n#=============================================" result += "\n# %-80s#"(self) result =+ "\n\n#============================================" return result Assume I've overridden repr to