All Articles

  1. When web pages check web-broswer compatibility

    I don't trust banks and definately not online banking since their log in procedures are laugable, at least in the UK (no complaints about my Belgian bank, although not all Belgian banks are good either). But somehow I managed to get an account which only allows transactions to my own …

  2. Warnings revisited (aka logging vs warnings)

    Earlier I posted about how to make warning messages from warnings.warn() look like fairly normal messages so they don't give you all the details about which line of code called them. The result was neat, but I found it a fairly crude way of doing it.

    There is another …

  3. Overriding formatting of warnings.warn()

    Today I needed to add the printing of warning messages to a command line tool written in Python. So Instead of writing things out using print, wich is not flexible enough and goes against my way to avoid user interaction deep inside functions and classes, I decided to use the …

  4. Ubuntu & reportbug

    Lately I only appear to be writing about things I'm unhappy with and general moaning. Sorry for that. But here's another one of them:

    An important part of Debian is the BTS, it allows users to report bugs as most people will know is obviously very important. Quite a few …

  5. mawk considered harmful

    Consider the following little awk script:

    /^--- [-[:alnum:].\/]+$/ { if ($2 !~ /[-[:alnum:].]+\/debian\//) print $2 }
    

    According the the O'Reilly's sed & awk book it is, as far as my knowledge goes, normal valid awk. It's intended to be used like such:

    ~$ zcat debian_package_version.diff.gz | awk -f script.awk
    

    The purpose is to …

  6. site, eggs, etc.

    Before I complained about why .pth files are not processed in files on in your $PYTHONPATH. I got a few pointers in that regard, thanks for them. And now I know why it doesn't happen: you can import foo, bar; foo.do(); bar.harm() inside a .pth file. Since this …

  7. Nuking your home directory

    /path/to/some/weird/directory$ rm -rf ~

    Yep, I've done that today. It sucks. 1.5 seconds after I did that I hit the power button in the hope the kernel wouldn't have flushed it's buffers yet (hm, that old trick might not work with journaling filesystems). Boot up in …

  8. When essential tools break...

    I hate it when that happens. Current case:

    flub@coronation:/tmp/sandbox$ gpg --clearsign test
    gpg: selecting openpgp failed: unknown command
    gpg: signing failed: general error
    gpg: test: clearsign failed: general error
    flub@coronation:/tmp/sandbox$
    

    That's just to get desparate. Some quick poking around results in leading me to …

  9. UTF-8 and Emacs

    While looking around in Manoj's Debian web-page/directory for his new Python policy (for how to package Python stuff for Debian) I stumbled, amongst other intresting things, across this cool UTF-8 demo file.

    To my surprise my web browser (Epiphany) shows nearly everything perfect, so does gedit. However my much …

  10. site module musings

    The site package reads .pth files and inserts directories listed there in sys.path. However it only scans lib directories ( lib/python2.4/site-packages/ and lib/python/site-python/ on UNIX) starting with sys.prefix or sys.exec_prefix for these .pth files. Thus if you install a module distribution using the …

  11. Python web frameworks

    It appears discussing web frameworks is popular currently. It also appears GvR has decided he likes Django and hopes it will become sort of the default.

    I've been looking at this Django and TurboGears things for a while unable to decide if I should move the website that I appear …

  12. setup.py: setup(..., extra_path="foobar", ...)

    The extra_path keyword that you can pass to setup() when using the distutils for building and installing a package is completely undocumented as far as I know. I have no idea how I found it the first time (about a year ago) but now it was there and was not …

  13. Today's WTF: sys.path in python != sys.path in ipython

    Spot the current directory ( <snip>/build/lib.linux-i686-2.4) in the path:

    <snip>/build/lib.linux-i686-2.4$ echo $PYTHONPATH
    /home/flub/lib/python:/home/flub/lib/python2.4:
    <snip>/build/lib.linux-i686-2.4$ python
    Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
    [GCC 4.0.3 (Ubuntu …
  14. GnuPG Smartcard on Debian Sarge

    There's a document on the GnuPG explaining how to set up your system to use a smartcard. There a few people around claiming that it works on a standard Debian Sarge by using udev. Up to today I have had no luck with that however, but that finally changed!

    I'll …

  15. Dalai Lama visits Belgium

    Like I care.

    But China cares, that's more worrying. Dispite it not being an "official" visit (he was invited by some buddhists to open a new temple) he visited the prime minister and some other politicians. And hence the chinese ambassador says it will hurt the Belgian-China relationships as they …

  16. Summer of Code 2006

    There must be about a million blog posts with this title by now. Anyway, here my own little addition, I've been meaning to write this for a while.

    I have not applied for SoC again althoug I was still eligible. There where intresting projects however, and in fact I'm sorry …

  17. No feedback?

    In the beginning of this week I emailed my mentor to know what he thought of my project, if he was happy with the state etc. I do know from his blog that he's fairly busy these days, but still would enjoy some feedback. Also just in case my email …

  18. One FIXME down...

    Profile.calibrate() now uses the correct timer instead of just the default timer (time.time()). In fact it still uses this timer when the user did not specify a specific timer (and why really would anyone want this? Appart form making me work one or two weeks more in the …

  19. Magic

    As promised I worked on a proper installble package of hprof. That went quite smooth, I had some trouble figuring out how to create a .pth file with distutils, but after some googling I found some setup keyword that worked. Not that is it documented in the official documentation. The …

  20. Small update

    This weeked I've been helping at home again building the patio outside. It's quite impressive to see things changing from a big pit of dirt in the morning to a nice surfaced area in the evening. If I had a digital camera I'd show you nice before and after pictures …

  21. (Almost) Done!

    Just completed hpstats module, it's all in CVS. This means that theoretically the project is finished! Altho I expect to code another few days on it before the end of August, nothing can be perfect... leave alone the first time round!

    Along the list of TODO's is making a little …

  22. Sleep is good

    Last night I got some problems with a function call. As far as I could see it was right but it's unit test kept failing. After a while I called it a day and went to sleep. Wake up this morning and have a look. Only to discover it was …

  23. Nice progress

    Work has been progressing nicely the last few days. All the hacking has been going smoothly, which does not mean bug free - far from it! But I seem to have finally reached a good cycle of writing unit tests, implementing the features and refining that all. The scaffolding is in …

  24. Ambiguous documentation

    pstats does not behave as the documentation says it does. I got to the stage that you can look through the output of Lib/test/test_profile.py (in Python distribution) and the output of that very same file but with a import hprofile as profile at the top instead of …

  25. Clarifying the hstats module

    Some confusion seems to exist about the stats modules I'm writing. About a month and a bit ago I wrote hstats as a module to analyse hotshot profiling data. It was never my intention to make it compatible with pstats at all. It aimed at being usable to read profiling …

  26. Why one should have a separate /boot partition: lessons learned

    Background

    The box (SPARC box to make matters more intresting) has two disks /dev/hda and /dev/hdb, they each have the same partion table appart from some free space at the end since two disks are never of the same size. All partitions are of type "RAID autodetec" and …

  27. Cross platform developing

    Even when using Python this is easier said then done. One should be very carefull as details lies in tiny details. Wich I discovered to my shame.

    Normally I work on a desktop, this box listenst to the name of Ultra 10, so it is a UltraSparc architecture as developed …

  28. Cleaning up?

    So last time I said I wasn't happy with hstats. Maybe that was a bit impulsive, but still valid. Kent Johnson kindly pointed out <http://bruynooghe.blogspot.com/2005/08/i-wrote-crap.html#112378135725654786> for me that was the wrong attitude. Maybe he's right (read: yeah, of course he's right), but …

« Page 6 / 7 »