Jed Tags with ntags (for dummies)

February 11, 2006
2 comments Linux

Working with Jed just got better. I've finally figured out how to use TAGS with Dino Leonardo's ntags extension

When programming in Jed I can now hold the cursor over a function in the code and by just hitting Alt+. it quickly jumps to the definition of that function. This is great if you for example need to quickly find out how a function works and what the parameter options are without having to a) dig out where it is defined (which file) and b) dig out where in the file it's defined.

Truncated! Read the rest by clicking the link below.

Geeking with Eterm and Tkinter

February 9, 2006
0 comments Linux

Something that I do at least a couple of times every day when working here in Linux is to take a blank screen and set up a few command line terminals for developing with Zope. One terminal in which I'll run the editor (Jed of course), one in which I'll run Zope in debug mode and one in which I'll run my product refreshing script. I want the terminal windows of certain sizes and positions and I want to be in a particular directory in each terminal so that I have easy access to stuff like ./bin/runzope and jed Products/SomeProduct/....

Still with me? Cool, that means that you probably do something similar or that you're just extremely bored and have too much time.

Truncated! Read the rest by clicking the link below.

tempfile in Python standard library

February 7, 2006
7 comments Python

I learnt something useful today which I can't explain. When you use the tempfile module in the Python standard library and the mkstemp() function you get two things back: an integer and a string.:


>>> import tempfile
>>> x, y = tempfile.mkstemp()
>>> x, type(x)
(3, <type 'int'>)
>>> y, type(y)
('/tmp/tmpK19sIx', <type 'str'>)
>>> help(tempfile.mkstemp)

I don't know what to do with the integer so I just ignore it. I thought I would get the result of open("/tmp/tmpK19sIx","w+b").

Truncated! Read the rest by clicking the link below.

Sexy furniture

February 5, 2006
3 comments Misc. links

Sexy Furniture Like it or not, this is at least cleverly new. It's the kind of furniture you'd guess Hugh Hefner would have in his log cabin out in the countryside. Or is it?

Isn't it maybe so bizarre that it's actually pretty cool. It's a bit dirty and perhaps sleazy but imagine how much attention a piece of furniture like this would get when you have guests over. If I had the space, the money and the courage I would order that big triangular table I think.

Size comparison of Zope3, Django and TurboGears

February 4, 2006
10 comments Python

There's been a lot of debate in the python blog community about which web framework is best for everyone else. There's also been a hot debate about templating languages much fueled by Guido's rejection of XMLish requirements. In the few blogs I've followed there seems to be a couple of finalists that deserve extra scrutiny: Zope3, Django and TurboGears.

I'm drooling over all of them. Zope3 feels like a wise granddad with vigour, Django as a bubblegum-chewing teenager with lots of energy and TurboGears as something in between. (if Twisted was to get an analogy it'd be Einstein or someone like that) I want to use all three or at least Zope3 and one of Django or TurboGears depending on the project. Stuff that needs thinking and will have to last and scale: Zope3. Quick and simple websites about a single topic: Django/TurboGears.

Truncated! Read the rest by clicking the link below.

Setting security declarations to Zope classes

February 2, 2006
5 comments Python, Zope

If you're into Zope python product stuff, read on, otherwise don't bother.

Thanks to Brian Lloyd (Zope corp) and Florent Guillaume (Nuxeo) I now know how to set security declarations on a class outside the class. It doesn't work like a normal python class (new or old style) which was a bit of a surprise. This is how you do it in a "normal" python class:


class _Z:
  def __init__(self):
      self.z = "Z"
  def declareProtected(self, *a,**k):
      print "++declare something+"

def foo():
  print "I'm being called"
  return _Z()

class A:
  security=foo()
  def __init__(self):
      pass
A.security.declareProtected("foo")

Truncated! Read the rest by clicking the link below.

ReCSS a tool to reload the CSS without reloading the whole page

January 31, 2006
1 comment Web development

I found this bookmarklet script from planet dojo but it has nothing to do with dojo itself. With this bookmarklet available in your browser you can refresh all external stylesheets without having to refresh the whole page. This is great because when you're debugging the a stylesheet it's time consuming to have to refresh, the HTML and the images just to refresh a stylesheet file for every little change.

Worth saving. Thanks David!

Northern light photos

January 30, 2006
0 comments Photos

Aurora Borealis, November 7 and 8, 2004 Only very rarely do you get to see photos of the northern light phenomena but here on this site you get loads (all from the same location though). On the site they don't call it northern light but The Geomagnetic Storm Resulting From the CME (Coronal Mass Ejection) produced by an X1-flare near sunspot 696.

Whatever they call it, in lack of being fortunate to see one with my own eyes, these photos will have to suffice.

Photos from FWC China 2005

January 27, 2006
0 comments Photos, This site

I've now finally uploaded all my photos from the trip to China.

From 1,000 huge jpegs (at 1.6Gb) down to 300 resized ones (at 43Mb) it took quite a long time to rotate, chose, colour modify and title. To do it I had to use digikam which is the best photo album organiser program available on Linux. Even though it's the best I've found so far it still sucks. It's frustrating when you have lots to do but it's free and works better than nothing and I haven't donated any money to it.

As you might have noticed I have had to reduce the image quality quite a bit especially of the thumbnails. Sorry about this but I see thumbnails as navigation, not the real content. If you want higher resolution images I might be able to get you the original JPG if you ask kindly for it.