How to customize Eclipse to be the best Python IDE with PyDev

You’ve tried dozens of Python IDEs and were annoyed that each one had weaknesses that the others didn’t have.

Now you don’t have to worry anymore.

pydevPydev is an Eclipse plugin that has really good auto-complete and code analysis: something that is lacking in the other Python IDEs. Most of the goodies were locked away for pay in premium mode, but now it is open source.

This is good news, but how do we solve the bloat problem of Eclipse? If you look at their download page, you will have to download a bloated version with that range from 80 to a whopping 370 mb. These packages come with plugins you will probably never use and will fill even more memory as if Java wasn’t enough of a memory hog.

Fortunately for you, here is the extremely well hidden link to the minimal Eclipse installation package here. You will want to scroll down and download one of the 47mb Platform Runtime Binary packages.

Once you’ve installed or unzipped Eclipse, run it, click Help, and click Install New Software. Add this URL: http://pydev.org/updates

One more thing that may help performance is to edit eclipse.ini and paste these lines below “-vmargs”:

-Xms128m
-Xmx384m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC

Now you have the best Python IDE at your fingertips.

Leave a Comment


Memory Size of Python Objects

People have wanted to know the size of Python objects for a long time, but before they had to dig into the source code. With the new function sys.getsizeof, you don’t have to.

Here are a list of sizes in bytes of common Python 2.6 datatypes. (containers are empty).

Type 32-bit 64-bit
int  12  24
long (1L)  16  32
float  16  24
tuple  28  56
list  36  72
dict 140 280
old class  48  96
old instance  36  72
new class 452 904
new instance  32  64
function  60 120
lambda  60 120
module  28  56
ascii 'a'  25  41
unicode 'a'  28  56
ascii 'ab'  26  42
unicode 'ab'  30  60

If you want to see a neat application of getsizeof, take a look at this hack.

int         12

1 Comment


Getting Rich with AdSense $0.00 at a time.

I’ve heard that its against the TOS to mention AdSense earnings, but I don’t think $0.00 qualifies as earnings (never mind, I can disclose “gross payments”).

0earnings

The varying levels of $0.00. During this time around 5000visits were received.

I was hoping that I could use this to sustain the hosting, but at these rates, it could be 100 years before I see payment. I am now wondering if I should remove them but it might not matter anyway since about 40% of visitors use ad block.

At least my account hasn’t been suspended like Hizook. Or maybe the $0.00 is another way of showing it.

1 Comment


Reddit Censors Atheism Category from Front Page

I had always thought that Reddit would be more resistant to the censorship that plagues Digg (such as the AACS ban and white-listing a select few sites that control 46% of Digg).

redditpope

Unfortunately this was proved wrong today.

Read the rest of this entry »

2 Comments


Backlash From Stackoverflow Reputation Tips

I recently posted 6 Stackoverflow reputation tips here. I knew there would be some criticism, but the amount of hate was beyond my expectations. There were people threatening to have me banned including one admin.

You would think that I was the Antichrist by some of the comments I had received.

urwrong

I thank Jeff for diffusing some of the negative reactions here, but I think he must have received flack for it since he came out with this statement on Twitter and did not respond to my comment on SO meta:

the gaming stack overflow user has been discussed. But at 7 months, 68 questions, and 325 answers, who is gaming who, again? :)

- Jeff Atwood on Twitter.

This same sentiment of Stackoverflow being the winner and me being the loser was also repeated here. It made me realize that I had not gotten the point clearly enough to them, so here I will try to re-explain my position.

Read the rest of this entry »

2 Comments