Friday, May 16, 2014

Pydev test, fairly good, but not perfect

Pydev test, fairly good, but not perfect

I am trying out the pydev plugin for eclipse, so far the code completion looks ok, but the python console is not reliable at all. Here is a very simple test:

Double click to toggle code

from subprocess import Popen
from subprocess import PIPE
shell_cmd = ["xsel", "-b"]
p = Popen(shell_cmd, stdin=PIPE)
p.communicate("what the hell is this?".encode("ascii"))

This code is just trying to put some text into the system clipboard, and it runs ok in ipython3, yet results are weird in eclipse. The same occurs to pycharm, I have no clue why this is happening.