Thursday, December 15, 2011

PyDev 2.3.0 released

PyDev 2.3.0 is out now.

See http://pydev.org for details :)

Tuesday, December 13, 2011

Preparing for PyDev 2.3.0

The major changes in this version will be the introduction of a pep8 analysis (it must be enabled in window > preferences > PyDev > Editor > Code Analysis > pep8) and scope selection/deselection (Shift+Alt+Up/Down).

The internal Jython version that PyDev uses was bumped from 2.1 to 2.2.1 to support pep8.py -- Jython 2.5 was discarded as an option because it became too big for PyDev (the PyDev distribution with Jython 2.2.1 has 7MB, if it went to Jython 2.5, it'd be around 14MB, so, I think it's not worth making the download twice as big just for this upgrade).

Also, as a plus, as Jython 2.2.1 is still based on the same grammar structure (JavaCC) that PyDev uses, so, I was able to give it a boost and provide some performance improvements that had been done to the PyDev grammar (Jython 2.5 uses Antlr, which seems to be one of the main reasons it became so big).

As a nice side-effect of this change, the PyDev startup seems to have improved somewhat (Jython 2.2.1 seems to start up faster than Jython 2.1), and now the Jython sources are included in the PyDev project (and not only a jython.jar), so, I can fine tune Jython itself for some PyDev use-cases (as it seems PyDev won't go for Jython 2.5 anyways).

There are also some critical bug-fixes in this release (an out of memory error when dealing with PyOpenGL, one cache issue which could make the pythonpath become wrong in memory and one deadlock were fixed).

So, anyone interested should get the current nightly build to see if all is working properly as an official release should be issued later this week (the current version should be the one released unless some critical issue is found in the meanwhile).

Tuesday, November 29, 2011

Making Eclipse look better on Ubuntu

The steps below are things to remember when I do a new Ubuntu install (so, I may revisit this when/if I reinstall Ubuntu again).

1. Tab bars in Eclipse are too big when run in Ubuntu:

There are 2 things for this:

1.1: Install Extended VS Presentation (update site: http://andrei.gmxhome.de/eclipse/)

1.2: Make menu bar smaller

Short version

gedit ~/.gtkrc-2.0

paste:

style "gtkcompact" {
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
}
class "GtkWidget" style "gtkcompact"

Full explanation in http://ubuntuforums.org/showthread.php?t=1465712


2. Window buttons are not in the right:

Short version:
Alt+F2, gconf-editor, apps/metacity/general, button_layout, menu:minimize,maximize,close

Full version: http://www.howtogeek.com/howto/13535/move-window-buttons-back-to-the-right-in-ubuntu-10.04/


3. Set proper theme:

System > preferences > appearance (get online theme): Clearlooks Compact (customize colors: selected items: #969696 (150,150,150))


4. Set fonts

Copy Windows fonts from C:\Windows\Fonts to ~/.fonts (tahoma and consolas) -- yes, I really like those fonts :)

System > preferences > appearance: use tahoma 8 for app/doc/desktop, sans bold 8 for window and consolas 9 for monofont (in windows I use consolas 10, but it seems Linux will render the fonts a bit bigger, so, a smaller size is needed).

Rendering: subpixel smoothing.


By request, a picture of how it looks (click to see it full):

Wednesday, November 02, 2011

PyDev 2.2.4 released

PyDev 2.2.4 is now out.

Major changes include:
  • Cython support
  • Better handling for external files (especially the ones under a folder/zip file in the PYTHONPATH)
  • Modules/packages appear in the globals browser (Ctrl+Shift+T)
  • Some improvements in the debugger

Along with a bunch of other things (more details on the release may be gotten on http://pydev.org )

Thursday, October 27, 2011

PyDev & Cython

The current PyDev nightly build has integrated Cython support :)

Instructions to get the nightly are available at: http://pydev.org/download.html

This is something I wanted to do quite some time already but hadn't found a good way to support Cython (mostly because the grammar support seems to be undocumented and all manually done).

So, I gave up for now on a full blown Cython parser and settled on parsing what needs to shown in the outline: classes, functions and Cython specifics: cdefs and ctypedefs -- without actually trying to do anything fancy with it (mostly showing things in the outline). It's still missing the actual scoping of things, so, items will appear flat in the outline -- but that should be fixed soon.

So, this means that code-analysis will gather much less things (right now I think it'll only gather mixed indentation analysis and duplication of function/classes).

As for the code-completion, it should be working for things that are context insensitive (i.e.: builtins, templates and global tokens for the auto-import). Some more testing needs to be done for the context-sensitive code-completion (not sure how much more can be done without a full blown parser behind it).

Aside from those shortcomings, most editor features should be working (anyone interested, please test it and let me know if there's something missing -- although I've used Cython on a few occasions, I'm hardly an expert in the area, so, feedback is much appreciated -- this should appear in a final release in a short time).

Note that to use the Cython editor, just open any .pyx file with the regular PyDev editor and things should work properly (it uses the regular PyDev editor, just customizing the parsing process).