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

#44

Down, Down, Down.....

emoticon:eyeballz Well, Voidspace is back up after an eighteen hour outage. I did wonder if it would come back at all ! The website for the host was also down. They are an ultra budget host and their technical support is frankly rubbish.

On the other hand this is only about the second or third outage that I'm aware of in almost a year, and they have Python 2.3.4 installed. As I've been with them almost a year I have to decide whether to stay with them, or move elsewhere. If a job I'm working on comes through, I might be able to get a Python-hosting.com account. It's looking good Very Happy

Ironically, this outage happened on the day that I get mentioned twice in Daily-URL. *sigh*.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2005-05-13 15:28:33 | |

Categories:


#43

Forging Ahead

emoticon:dove I've just got Sourceforge projects setup and configured for rest2web and the guestbook. I still need to edit the documentation to include the sourceforge logo etc. I was very lucky with the guestbook project. I actually got guestbook as my project name - it was in use, but abandoned; so I've taken it over. Very Happy

I've been using releaseforge to do the actual releases. It's written in Python, but because it uses the QT library, you need to use a binary package on windows [1]. releaseforge makes new releases about 100 times easier than through the sourceforge web interface.

[1]The QT library is commercial for windows, but license holders (like Phil Schwartz) are allowed to distribute binary packages.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2005-05-12 13:44:53 | |

Categories:


#42

The Snake is Still Serving

emoticon:file1 A few weeks ago I blogged about a simple server with SSI I'd hacked together. Well...... I've hacked it around some more.

I had a problem in that my main development computer is part of a small network that isn't connected to the internet. My website includes various little snippets of offsite stuff - javascript, the odd image, google ads, etc. When viewing pages served locally, the browser was waiting for the network to time out every single request before it could display the page. This made testing pages interminable. Change a page, copy the new file into the server folder, wait for the browser to load it, repeat endlessly....

What I needed was a server that ignored requests that weren't in the localhost domain. It would also be nice if I could have it serve files from my 'FTP Changes' folder - but if the file isn't found there check my 'FTP Mirror' folder. This means I can keep a single folder of edits for upload, and have my server check there first.

So I've hacked CGIHTTPServerWithSSI to do both of these. The easiest way to achieve the first objective was to have the server run as a proxy server. You tell your browser to fetch everything through localhost:9080. When run in this way CGIHTTPServerWithSSI checks if the request is for a URL in the localhost domain. If it isn't it drops the request, if it is it serves it itself.

The second objective is achieved by specifying an alternative location to check.

It's nice that writing a proxy server is so simple (in principle anyway - a heavier duty solution might be harder work). The only difference is that you get the whole URL as the path when the server is being used as a proxy. In terms of the CGIHTTPServer code [1], this means that if self.path starts with http: [2] then we know we are running as a proxy...We can then use urlparse.urlsplit to separate the actual path from the domain.

You can download version 0.3.0 from the recipebook.

[1]On which this is based.
[2]Or whatever....

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2005-05-11 15:47:07 | |

Categories:


#41

A Sad Day

emoticon:html It's a bit sad, but I wasn't able to resolve the fluid layout with IE problems on Voidspace. The new design looked fine so long as you had a full sized window, but anything smaller than a 1024x768 resolution with full screen window, and the sidebar would start to overlap the contents. This is basically because IE ignores the min-width CSS properties [1]. Sad

There is a solution that involves using javascript expressions in CSS, but I couldn't be bothered when I could sort it with a table layout in five minutes.

A table layout, along with CSS for styles, is the hybrid approach that Jeffrey Zeldmann recommends in Designing with Web Standards - as part of an XHTML 1.0 Transitional design.

I've actually used the table trick from Dive into Accesibility by Mark Pilgrim. It puts the body of the page before the sidebar in the source. This means that textual browsers don't have to go through the sidebar every time in order to get to the actual contents.....

[1]The site behaved nicely on Firefox. I know the reference I supplied talks more about max-width, and that in theory the width property behaves like min-width for IE... except it didn't work. The trouble was I had two elements (sidebar and page body) that I wanted to both have a minimum width and yet have a total width of 90% of the window size.... unless the window was too small. Simple hey ! The thing is, with a table it just works.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2005-05-11 11:18:44 | |

Categories:


#40

The Halls of Science, Technology, Computers, and Stuff

The first section of my website rendered with rest2web is now online !

See Welcome to the Halls of Science, Computing, and Technology.

In the next few days this section will replace the Science and the Computer sections.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2005-05-10 10:27:26 | |

Categories: ,


#39

rest2web in the Wild

emoticon:python Finally, the long awaited (ahem) release of rest2web. It's an early release - lot's more features still to be added - but it all works. Hurrah

For those who haven't been religiously reading this blog over the last few weeks, here's the lowdown :

rest2web is a tool for autogenerating websites. It allows you to store your contents in reST format, and generate pages and indexes from templates. It uses a simple but flexible templating system and generates index pages and navigation links.

This means that adding new pages is as easy as dropping a text file into the right folder. rest2web will handle adding the link to the index page and creating the new page from a template and the contents. Removing a page is as easy as deleting a single file, and have rest2web automatically rebuild the indexes.

The download includes the rest2web code, and docs and a test site. The test site serves as a simple illustration of how rest2web builds pages and indexes.

For full details see any of the following pages :

The next features to add will be auto sitemap generation and a bigger change (under the hood) to make the index data available to every page in a section. This will allow pages to have sidebars with links, rather than just a single index page.

I'm already building part of the Voidspace website with rest2web, over the next few months it will take over....

So far tested on Lunix and Windoze, if anyone tries it on the Mac I'd like to hear...

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2005-05-09 10:47:49 | |

Categories: ,


Hosted by Webfaction

Counter...