Older blog entries for donky (starting at number 7)

Started rewrite of whelkboard. Notes:

MySQL:

  1. Setting the password for a database user

    Assigning a password to the user via
    UPDATE USER
    SET PASSWD = PASSWORD('password')
    WHERE USER='username'
    just didn't seem to assign a properly encrypted password. Eventually discovered (when logged in as the root user)
    SET PASSWORD FOR username = PASSWORD('password');
  2. Using MySQLdb

    db.fetchall()
    returns a tuple containing a tuple for each row. e.g.
    ((1L, 'fudge'))
    

Next step is to build in simple user support and then to hook that into cookies. Would like to run all the python CGI in the same runtime so that I can keep a resident shared object but have no idea how to go about it at this stage.

Why are my spaceships not turning?

Learning Icelandic is very hard. Its funny to find that English is such an easy language to learn comparatively.

Not enough time to write something similar to Scoop in Python or work on my MUD...

Being in a country where it snows lightly for days on end is fantastic. The only downside is when you have to walk into it :)

Feh. Finally got it.

import pgdb
db = pgdb.connect('localhost:whelkboard:wbuser:password')
cursor = db.cursor()
cursor.execute(CreateTableSQL)
db.commit()
cursor.close()
db.close()

During the day today, after work, I can finally start programming the Python for Whelkboard. Have decided its probably best if I ditch David's initial code and use it as a reference. Anyway its late, and work starts at 10:00 AM as always.

14 Feb 2001 (updated 14 Feb 2001 at 23:54 UTC) »

Have written down a basic set of SQL table creation commands and they are waiting for PostgresQL to become functional. The first step for that to happen is to get Python working with it.

  • PyGreSQL
    Looks like a good start. Was a really simple install, just hand compiled the shared object according to the "RedHat" instructions that are in the README.linux file - then copied it into the python1.5/lib-dynload directory.

  • mxDateTime
    Gives database safe dates and times or something. Yet to determine if it is of any use. Installed it anyway.

Well after spending several hours playing around with PostgreSQL, I have finally set up a user who can create tables within the database they "own". Well, upon a check just now, it appears not. Feh. Initially the problem was that I created my new database "whelkboard" while I was the "postgres" user. Then I was trying to access and then assign the database to the "wbuser" user. With no luck, there seemed to either be no way in PostgreSQL how to give "wbuser" the ability to create tables within it. So, I dropped the database and created it as "wbuser". This worked fine, and creating tables also worked fine - in psql that is.

But, that however, is about as much help as tits on a bull. What I really want is for the "pgdb" Python module to create tables as that user. I can get it to connect as that user to that database. I can execute the table creation statements on the database with the same output as seen in psql, but the statements don't seem to actually create the databases. Admittedly, I think "pgdb" is designed for PostgreSQL 6.5, but given that the messages coming back from the version I have are the same ones I see in psql, that seems to indicate that this isn't the problem. God knows what is.

The next step in setting up the database structure is to hand make the table creation statements. Here is one prime area where open source databases suck so bad, creating SQL server databases and tables is so easy and painless.

12 Feb 2001 (updated 12 Feb 2001 at 23:46 UTC) »

Trying to reinstall PostgreSQL on the MUD box. The RedHat distribution that the box uses is such a hassle to work with. The RPM tools just don't work and I tend to just pretend that previously installed packages aren't installed and just rebuild and install over the top. If it wasn't for all the things that the box does that I simply do not have time to recreate, I would switch to Debian or Slackware.

First priority is the new boards system for Imaginary Realities. Which is why I am installing PostgreSQL - currently Whelkboard uses pickled python save files and the first step is to convert it to use a database backend.

Quite a few popular open source software seems to suck. Take for example PostgreSQL - what a nightmare to set up from source, it compiled fine and installed badly - at least compared to other packages I have installed using my usual technique. Then there was no obvious documentation to show how to get things running. And to think I used to curse Microsoft for bad documentation.

These diary entries are for my own reference :) If anyone else finds them.. well, you are in the wrong place if you are looking for someone making a public statement.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!