pydev

Eclipse and Python 3: why does printf() from ctypes display in console output after subsequent print() statements

蓝咒 提交于 2019-12-10 14:53:08
问题 I am running Eclipse with PyDev and Python 3.2 on Windows Vista, and was working through a tutorial on Python and ctypes. However, I found that when I call msvcrt.printf() to print a string, this is not displayed in the console output for Eclipse until all other print statements have displayed. Here is the exact code I use: from ctypes import * msvcrt = cdll.msvcrt message_string = "Hello Worlds!\n" printf = msvcrt.printf print(printf("Testing: %s".encode('ascii'),message_string.encode('ascii

getPass() echoing password in Eclipse

限于喜欢 提交于 2019-12-10 14:35:36
问题 Hey all just started dabbling in a little Python to help out with a few scripts at work, but I seem to be getting hung up on a little issue. I am using Eclipse with pydev for my development platform and developing against python 2.7.3. I am just trying to prompt a user for their password, using: password = getpass.getpass() That line works as expected when running in the terminal/command prompt, however when I am running in the Eclipse console, the user's input isn't hidden like it should be.

Error installing pydev [duplicate]

人走茶凉 提交于 2019-12-10 14:21:46
问题 This question already has answers here : Problems downloading artifact - error reading signed content (2 answers) Closed 4 years ago . I have eclipse 3.7 installed and I'd like to install pydev from pydev.org/updates from help>install new software but I keep getting errors: An error occurred while collecting items to be installed session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Problems downloading artifact: osgi

Pre-fill new functions in Eclipse and Pydev with docstring and “Not Implemented” exception

橙三吉。 提交于 2019-12-10 13:21:01
问题 I am editing my Python source code with Eclipse and Pydev. I want to document all of my functions and raise a "Not Implemented" exception whenever a function have not yet been implemented. For instance when I type: def foo(bar1,bar2): On enter, I would like it to autocomplete to: def foo(bar1,bar2): ''' function foo @param bar1: @type: @param bar2: @type ''' raise NotImplementedError("") Is there already an option in Pydev or Eclipse to do it? If not, is there a separate Python module or

Using virtualenv with eclipse

邮差的信 提交于 2019-12-10 11:35:54
问题 I am trying to use virtualenv with eclipse PyDev. I just execute point my project interpreter to the virtualenv python interpreter. Everything seems to work fine, but eclipse show me "Unresolved import unittest". When I run the unit test module, it runs well, but the message stills appear in eclipse IDE. Looking at the virtualenv python lib folder, the unittest module isnt there. What Am I doing wrong? The python that the virtualenv installed doesnt seen to have all the libraries. Eclipse

change port in pydev

狂风中的少年 提交于 2019-12-10 10:49:51
问题 Hi everyone i'm trying to learn the django framework and I'm using PyDev (Eclipse Python Development Framework/Plugin). When I try to run my application I get an error: Error: [Errno 10013] I know that this is because of the port. I use the port 8000 and i want to change it to 8080. Does anyone knows what exactly should i do to change the port? pydev debugger: starting Validating models... 0 errors found Django version 1.3.1, using settings 'muapp.settings' Development server is running at

Python unicode write to file crashes in command line but not in IDE

别来无恙 提交于 2019-12-10 10:32:53
问题 I'm having a problem wherein my Python 2.7.3rc2 code runs fine through an IDE (Aptana Studio 3 with PyDev), but crashes when I either double-click the .py file or try to run it from the Windows command line. The problem line is where I try to write a string containing unicode characters to a file. The IDE has no problem with it, and writes the file properly with the unicode characters. The command line version complains that it can't encode certain characters. The root of the question is:

Code-Completion for e.g. Numpy, SciPy or Matplotlib does not work in Eclipse PyDev

£可爱£侵袭症+ 提交于 2019-12-10 10:23:08
问题 Can't get code-completion to work for e.g. SciPy, Numpy or Matplotlib in Eclipse/PyDev under Ubuntu 12.4 or 11.4. Tried with Eclipse Helios and Juno, PyDev in latest version (2.6). Code completion does work for e.g. internal project references or builtins. Have added path to "Preferences->Pydev->Interpreter - Python->Libraries" and added scipy, numpy and matplotlib to the "Forced Builtins". Under "Preferences->PyDev->Editor->Code Completion" "Minimum Number of chars..." is set to 1,

pydev does not recognize django installation

ぃ、小莉子 提交于 2019-12-10 05:08:31
问题 I have python 2.6.1 installed with django 1.3 and PyDev 2.0. I am able to import django and print the version from commandline. However, when I try to create a Django project with pydev or even import django I get an error. When creating the django project, I get "Django not found." error. I have tried removing and adding the pythong interpreter to rescan the site-packages. I see that django is not available in the Libraries section. I have even tried adding the folder manually and applying

PyDev doesn't execute shortcut to send current line to console

感情迁移 提交于 2019-12-10 04:49:38
问题 According to this question and the PyDev documentation on the interactive console, pressing F2 should send the current line from the PyDev editor to the Python console. I have a Python file open in the Python editor (I made sure of this by opening it "Open With" --> "Python Editor") and have started a console session by pressing Ctrl + Enter . Nonetheless, when I press F2 , nothing happens. I have to select the line I'm interested in and send it to the console with Ctrl + Enter . I've checked