Quick and easy install for pytw on DreamHost

First of all, let me introduce pytw. Its motto is ‘pytw – very simple’. Is so simple it avoids uppercase letters. You don’t get much simpler than that.

The motto actually confused me at first. I though pytw was going to be incomplete or just aimed a copying a TiddlyWiki file to a server. I’m glad to be wrong. The simple ideal is to keep it agile and modular regarding development.

My personal knowledge of Python can be summarized by three words: non-existant. So installing pytw wasn’t going to be easy (or so I thought). Since I’m still a novice with the command line, I’ll show you how to install it without using the command line. (Okay I lie, I’ll give you a tip or two on the command line)

Step 1: Acquire and Unzip

First of all go download the pytw package from its website. Then, you need to expand it, my prefered method is to use 7-zip, it takes two passes then you have a folder named pytw with all the necessary files.

Step 2: Alter the index.cgi file

Now in the pytw folder, edit the file called ‘index.cgi’ Change the first line from #!/usr/bin/env python2.4 to #!/usr/bin/python Notice how there are no spaces in there. None. Don’t think about putting them (unless you know exactly what you are doing, unlike myself).

Here’s the command line part: you can use the which python command on the server and if it has python, it should tell you where python in installed

Step 3: Upload everything

Save you ‘index.cgi’ then open a useful ftp program. I’m using Smart FTP though Filezilla works well too. Once it finishes uploading go to the ‘index.cgi’ file and change its permissions to 755.

(Command line equivalent: go to the directory its in and enter: chmod 755 index.cgi)

You can now access your site from the internet. It now totally works. Of course, there are pytw modules and other such things, but thats beyond my experience. Maybe I’ll write about those kinds of things once I master them.

Step 4: You probably need to make the directory writable (I didn’t have to though!)

On my dreamhost server the directory is automatically given permissions of 755, so the web server can write and store the tiddler stuff there without any help. If you have problems you probably need to do a chmod 755 store -R. This goes and make the store directory like it needs to be (the -R tell is to goe recursively and set it up with each subfolder and file as well.)

Feel free to offer comments, corrections, and compliments in the comments.

3 thoughts on “Quick and easy install for pytw on DreamHost

  1. Thank you for this. Without it, I seriously doubt I would have succeeded in installing pytw, although my path to python was a bit different : usr/local/bin/python Just thought I’d make a note of that hee for anyone else puzzled over what to try next (been there myself).


  2. Has anyone else figured out how to get Authentication to work for pytw on DreamHost? Maybe I’m missing something, but, ideally, there should be page-based authentication. I don’t want any random schlub to be able to view my gtd-pytw. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.