Python Programming, news on the Voidspace Python Projects and all things techie.


No Comment

emoticon:newspaper I've just added comments to this blog using Haloscan. In actual fact the system looks so simple that I might build something similar myself. A piece of javascript and a CGI ought to do the trick. Haloscan also handles trackbacks - and I don't know enough about them to implement something myself, without a bit of research.

There's also a nice piece of Javascript that I've added to my sidebar - the Search this Page box. I don't like cluttering the sidebar - so it's also an experiment and I may remove it.

I'm slowly edging my way into learning Javascript. My eventual aim is to be able to contribute to Kupu, which is a lovely piece of work.

Creating the comments system should be reasonably straightforward - most of the work is already done in the guestbook. Speaking of which - Mark Andrews has written something called, which I will probably integrate into the guestbook (and comment system) in order to add emoticons.

Oh Yeah...

And another thing.. I had two mentions in the Pythonware Daily URL yesterday. I've had about 4000 refferals from them this month - flippy neck. The editors must like me or something ??!?!? According to how much I earn from google adsense - I owe someone there about 2 beers !

Like this post? Digg it or it.

Posted by Fuzzyman on 2005-04-22 08:53:13 | |

Categories: , ,


Name, Rank, and Number

emoticon:globesearch Another quick hack with the google api. A short piece of code I've named googlerank.

It uses the google api [1] to do a search using terms you provide. It looks for results in your domain name. This tells you how highly ranked your website is for particular search terms.

Because each search only returns 10 results, and you're limited to 1000 searches per license key, it looks to see if your domain is in the first 200 results. This is easily configurable of course.

It returns results like :

For the search term "cyberpunk" :
Out of an estimated 298000 results.
Your website came at position "154".

For the search term "python cookies" :
Out of an estimated 176000 results.
Your website came at position "7".

This is theoretically useful for website design - but mainly just fun. At some point I'll add a Wax GUI - so that Justin who is a web designer can use it.

Quick News

Since adding the rel="nofollow" tag to links added in my guestbook, I've had much less spam.

Adding google ads to my website seems to be a success. Click through rate is around 1%, and I'm earning [2] about $1 per thousand impressions. This seems high to me - but at around half this, Voidspace will still cover it's costs.

Using CSS for layout hasn't been too successful though. I have a problem with IE that would be so simple to solve by using a table for layout. I'm very tempted to do it.

Don't forget to check out my latest PyZine article. It's free to view and about writing Python CGI applications. I have several more articles due to be published. I'm really enjoying writing for PyZine - I just hope people read the articles !

rest2web is coming on very nicely. Huge swathes of this website ought to be autogenerated soon (and converted over to the new style).

I've actually got a job to produce a website for someone. Possibly with a Python gallery application thrown in. This might give me access to a decent hosting account. You never know !

[1] - a nice high level layer over the SOAP interface to google. You'll also need a google license key of course.
[2]Allegedly earning anyway.

Like this post? Digg it or it.

Posted by Fuzzyman on 2005-04-20 08:17:35 | |

Categories: ,


I Have a Cunning Plan

Want a Free Website ?

emoticon:noise Finding a free web host without adverts is difficult. Finding a reliable one, so that you know your site will still be up in six months time, is next to impossible.

What if I told you that you could get a free website, hosted by an internationally renowned host - who isn't about to disappear or start charging ? Not only that but they offer unlimited bandwidth, free publicity tools, and a built in content management system ! Impossible ?

It's not only possible, but you've already heard of them - our friends They allow you to archive posts by subject and by date. By making clever use of the templates and archives, it's possible to use these as sections and subsections for a website. It also makes it very easy to post new articles ! To see what I mean have a look at [1].

Anyone Really Want a Free Website ?

I do actually have a bit of spare bandwidth and hard drive space here at Voidspace. I'd be interested in hosting a personal site for anyone who wanted to do a Python related blog, using firedrop as a client, and also experiment with Python CGI. These are both areas in which I'm keen to build community.

Whilst We're On the Subject

rest2web built a whole section of my website yesterday, including automatically creating navigation trails, and building the index page. There's still too much of the 'display logic' in the templates [2], but most of it's working.

It reads a small index file from the start of each page of content, and uses that to build the page and the entry in the index page.

All I have to do now is convert my content from horrible HTML 4 to reST !!

[1]My partner in Cyberpunk crime.
[2]i.e. lots more polishing to do.

Like this post? Digg it or it.

Posted by Fuzzyman on 2005-04-19 08:47:33 | |

Categories: ,


Served by a Snake

emoticon:file1 It's a real testimony to the quality of the Python standard library, that a new server [1] can be hacked together in less than an hour and less than a hundred lines of code.

I'm still working on rest2web, which will build my website for me from reST content, and templates. I use SSI [2] with my website. This means just viewing them doesn't work, they have to be delivered by a server to look right. This in turn meant I either needed to generate all my test pages straight into the server directory, or use something like SimpleHTTPServer to serve them from wherever I would rather generate them.

Unfortunately SimpleHTTPServer doesn't do SSI processing. With a little bit of hacking, CGIHTTPServerWithSSI was born. Hurrah. It's actually based on CGIHTTPServer and it only supports two SSI instructions so far [3], but I'm already finding it dead handy. Simply drop it in a directory and it will serve webpages, with directory as the root directory. Any pages that end in .shtml or .shtm, it does SSI processing on.

Just in case anyone else might find it useful (or just wants to look) - it's up on the recipebook page.

I like it because I feel like I'm starting to get to grips with making good use of regular expressions. I've got a lot to learn, but at least I don't avoid them at all costs now.

rest2web is coming along nicely. It will now autogenerate pages and the breadcrumbs navigation trails. Just the index pages to do, and the first working version will be ready.

[1]Even if it is a simple one.
[2]Server Side Includes - processing instructions for the server, in the html.
[3]include and flastmod. If anyone wanted more instructions implementing, it would be very easy to extend - and I'd be happy to do it.

Like this post? Digg it or it.

Posted by Fuzzyman on 2005-04-16 13:55:22 | |

Categories: , ,

Hosted by Webfaction