pydev

Python - Polymorphism in wxPython, What's wrong?

喜欢而已 提交于 2020-01-05 10:26:55
问题 I am trying to write a simple custom button in wx.Python. My code is as follows, an error is thrown on line 19 of my "Custom_Button.py" - What is going on? I can find no help online for this error and have a suspicion that it has to do with the Polymorphism. (As a side note: I am relatively new to python having come from C++ and C# any help on syntax and function of the code would be great! - knowing that, it could be a simple error. thanks!) Error def __init__(self, parent, id=-1, NORM_BMP,

eclipse pydev - how to install python modules

自作多情 提交于 2020-01-04 02:19:13
问题 Just working my way through a (very good) book call Test Driven Development using Python. This makes use of Python3.4 by the way. By the way, I am running in a Windows 7 OS. I've got all the stuff working using a simple text editor and running from the command line... in the course of which in particular I used "pip install" to install Django and Selenium, as per book's instructions. This created folders "selenium" and "django" under ...\Python34\Lib\site-packages\ ... so I added these to the

Undefined variable from import when using protocol buffers in PyDev

穿精又带淫゛_ 提交于 2020-01-03 10:21:43
问题 I've got a PyDev project that uses protocol buffers. The protocol buffer files are located in a zip file generated by the protoc compiler. Everything works when I run the program, however PyDev reports "Undefined variable from import" for every enumeration constant. So for example: import model_pb2 value = model_pb2.Expression(type = model_pb2.Expression.PARAMETER) It reports the enum constant "PARAMETER" as being an undefined variable. There are several dozen similar errors in my program,

PyDev: Unresolved import

浪尽此生 提交于 2020-01-03 05:27:05
问题 I use PyDev in Eclipse and have a custom source path for my Python project: src/main/python /. The path is added to the PythonPath. Now, i want to use the library pyMIR: https://github.com/jsawruk/pymir, which doesn't has any install script. So I downloaded it and and included it direclty into my project as a Pydev package, the complete path to the pyMIR is: src/main/python/music/pymir . In the music package ( src/main/python/music ), now i want to use the library and import it via: from

Eclipse: PyDev installation difficulties

别等时光非礼了梦想. 提交于 2020-01-03 05:25:05
问题 I'm having difficulty getting PyDev to work. I had an installation of Eclipse for PHP developers (1.2.1.20090918-0703). A month ago, I installed PyDev, and everything worked great. I go to fire it up this morning, and PyDev is gone. There is no option to create a Python project, the Python language editor is missing, etc. Eclipse for PHP does not say that PyDev is installed, so I grab it from the update URL. The version that comes down is 1.5.6. I restart after the installation, and

Using pyobjc imports in PyDev in Eclipse on Mac OS X

烈酒焚心 提交于 2020-01-03 05:19:06
问题 I've installed and configured PyDev version 1.6.5.2011020317 inside Eclipse, running on Mac OS X 10.6.6: Version: Helios Service Release 1 Build id: 20100917-0705 I used 'Auto Config' to set up my Python interpreter: it correctly found /usr/bin/python (which is Python version 2.6.1) and added various system folders to the PYTHONPATH , including /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC . Now that path is the correct path to the Foundation module in OS X

Pydev: error initializing console

坚强是说给别人听的谎言 提交于 2020-01-02 08:44:14
问题 I can't get the Jython console to work in Eclipse Luna. The Python console works. The error message is: Error initializing console. Unexpected error connecting to console. Failed to recive suitable Hello response from ... The problem and a solution is described here:proposed solution The solution describes a fix in XP which i've tried to follow in Windows 7 though the steps are not exactly the same as described.. I had to check 'use a proxy server' and then add the 'localhost', ... to the

Pydev: error initializing console

馋奶兔 提交于 2020-01-02 08:44:06
问题 I can't get the Jython console to work in Eclipse Luna. The Python console works. The error message is: Error initializing console. Unexpected error connecting to console. Failed to recive suitable Hello response from ... The problem and a solution is described here:proposed solution The solution describes a fix in XP which i've tried to follow in Windows 7 though the steps are not exactly the same as described.. I had to check 'use a proxy server' and then add the 'localhost', ... to the

Why is the re module trying to import enum.IntFlag?

你离开我真会死。 提交于 2020-01-02 07:04:13
问题 How is it possible that a core module is importing a non-existent name from another core module? Specifically, the re module importing enum.IntFlag Ways to Reproduce It can be reproduced by launching an interpreter and attempting the import, running a program that depends on enum.IntFlag such as pip , viewing the interpreter settings page in Eclipse, using the text editor, running the interactive console in PyDev, ... Directly importing from enum import IntFlag Traceback (most recent call

Why is the re module trying to import enum.IntFlag?

对着背影说爱祢 提交于 2020-01-02 07:03:20
问题 How is it possible that a core module is importing a non-existent name from another core module? Specifically, the re module importing enum.IntFlag Ways to Reproduce It can be reproduced by launching an interpreter and attempting the import, running a program that depends on enum.IntFlag such as pip , viewing the interpreter settings page in Eclipse, using the text editor, running the interactive console in PyDev, ... Directly importing from enum import IntFlag Traceback (most recent call