pydev

How can I make the PyDev editor selectively ignore errors?

I'm using PyDev under Eclipse to write some Jython code. I've got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ISubInterface The problem is that PyDev will always flag this as an error and say "Unresolved import: ISubInterface". The code works just fin...

Something disturbing about PyDev content assist

I created a simple class in Python as follows, from UserDict import UserDict class Person(UserDict): def __init__(self,personName=None): UserDict.__init__(self) self["name"]=personName In another module I try to instantiate an object of class Person and print its doc and class attributes: import Person p = Person.Person("m...

Django unit testing - Why can't I just run ./tests.py on myApp?

So I'm very familiar with manage.py test myapp. But I can't figure out how to make my tests.py work as an stand-alone executable. You may be wondering why I would want to do this.. Well I'm working (now) in Eclipse and I can't seem to figure out how to set up the tool to simply run this command. Regardless it would be very nice to sim...

Eclipse smart quotes - like in Textmate

Hey all, Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I'm a newbie here so be gentle. FWIW - I'm using pydev in Eclipse. Thanks Rephrase What I am looking for is given I have a word or phrase selected on...

How to create program startup parameters in python

I'm just beginning to learn python and the program I'm writing requires parameters for it to run with a specific task. For example (programs name is Samtho) samtho -i Mozilla_Firefox How can I do that? ...

What is the easiest way to debug embedded jython in eclipse?

I know I can debug embedded (launched from a Java program) Jython with a remote Pydev debugger. Is there a simpler way to do it? ...

How do I select a file within a .app in Mac OS X?

I'm trying to configure PyDev in eclipse, and as part of that I'm trying to add some source folders to the External Libraries section for PYTHONPATH. However, when I click "Add source folder" in eclipse, it's not letting me drill into any .app directories. Normally, in regular Finder, I would right click and choose "Show Package Contents...

Conditional statements in Eclipse templates

Eclipse templates can automatically insert text and variables as you are coding. When variables are used with the ${variable} form, the value is inserted automatically. My question is whether you can add sections to these templates conditionally. Can you have a method definition template that will fill in multiple variables and add loca...

Imports with Pydev/Eclipse

I'm working with the interactive console in eclipse, and reload does not show updated functions in my code. My code was : def func1(): return 1 def func2(): return 2 but when I changed it to def afunc1(): return 1 def func2(): return 2 def func1(): return 3 and ran imp.reload(TestMod), I go...

Python programming on Eclipse with Pydev

I need major help getting started! I managed to create a new project, and add python.exe as the interpreter. But when the project is created it's blank. How do I start programming? Ugh. ...

Eclipse (with Pydev) keeps throwing SyntaxError

My code: print "Hello World!" I even tried adding a semicolon behind, but everytime I save and run (as Python run) it says: File "E:\Software\Eclipse\Workspace\Python1\src\main.py", line 1 print "Hello World!"; SyntaxError: invalid syntax I have no idea why. ...

pydev 1.5.3 not working fine with Easy Eclipse 1.3.1

I installed Pydev 1.5.3 (so that I could get the merged version of Pydev Extensions in core PyDev) in an EasyEclipse 1.3.1 installation. After this, Compare with > Base revision etc. comparison operations stopped working. I had to disable the PyDev 1.5.3 and revert back to the pre-installed Pydev 1.3.13 (part of EasyEclipse 1.3.1). Has...

pydev disappeared when sudo eclipse

pydev disappeared when sudo eclipse I am trying to run py script with root power within eclipse. So I started eclipse as 'sudo eclipse'. But then pydev plugin dispeared. The CDT plugin seemed to be OK. I installed eclipse from Ubuntu repository and pydev using eclipse 's installation manager under my user account. Pydev is working fin...

Trick code completion with PyDev like with PDT?

Is there a way to help PyDev code completion by telling it the type of a variable? With PDT, you can use PHPDoc-like syntax for such purpose: /* @var $my_var MyClass */ $my_var = myFunction(); // PDT is able to figure out that $my_var is a MyClass object. But till now, I cannot figure out how to do the same in python. ...

Function parameters in Eclipse/PyDev

How do I display the function parameters help box when I'm in the middle of typing them? By looking at questions like this one, it seems that I have to hit either Ctrl+SPACE or Ctrl+Shift+SPACE, but neither of these seems to work. The parameters are displayed when I type the (, but then they disappear. BTW, a related question: It seems ...

Interactive pyDev console at breakpoint

I'm using Aptana Studio with Pydev 1.5.3 to debug my Django applications. I use PyDev's remote debugger and some code in manage.py and for most of the time this setup is working successfully- I can set breakpoints, inspect variables and step/continue through my code. However, I'd like to execute arbitrary code at the breakpoint- the th...

Eclipse + pydev - Missing Console-view toolbar in minimized mode

I'm using Eclipse + pydev plugin as the development environment. In fact my application needs a big console area and I usually resize the console and minimize it, so that whenever I run the application, it automatically shows up. But when I minimize the console view or detach it or mark it as Fast View, the toolbar for controlling the r...

"Pre-importing" a variable into a module.

Python beginner here, so I apologize if this question has a simple answer. (I hope it does.) I am working on a python module--a plugin for a larger program. I'm trying to develop the module using the Eclipse IDE (with pydev), which means I need to be able to run this module stand-alone, i.e. not as a plugin from the larger program. ...

pydev issue with gobject

It seems that Pydev (1.5.4) on Eclipse (3.5.1) with Python 2.6 isn't able to correctly cross-reference the package gobject. Putting import gobject works OK but any more than that (e.g. class X(gobject.GObject) causes Pydev to report "unresolved reference" errors. What could be the problem? Note that every other package I use doesn't t...

What is the the [shortcut/other way] for go to definition in Eclipse+Pydev

I used to use WingIde, where in a shortcut(f4, default) which I used quite often was Goto definition, which will open the definition file, and take me to it. Is there a similar shortcut for eclipse+pydev? ...