GUI Programming with
      Python and Qt

Quick Links

Python index
GUI Programming with Python Using the Qt Toolkit
Database Objects
Kura (now maintained by Peter Bouda)
CGI scripting and MySQL
Python + KDE Tutorial
Python + KDE Resources
PyKDE example programs
Python and Qt2
PyKDE and PyQt news
A population simulation with Stackless Python
Drift: a language simulation in Python
Anonymous CVS access


  • 28-04-1999 - Creation

© 1999 Boudewijn Rempt
Logo ©

Drift -- a game of language generation

Download: drift-1.0.tar.gz.

CAVEAT DOLATOR: The data files and for this app are in utf-8 encoding. Opening and saving them in another encoding DESTROYS the functionality. You have been warned.

ITEM: You need Python 2.2.1 to run drift. Really. I wrote this to experiment with the new features in Python.


Set your environment with setenv (after editing it to suit your preferences). Source it:

boud@calcifer:~/prj/drift> . setenv

Run the generator with the packaged phonology and lexicon:

boud@calcifer:~/prj/drift> drift phonology lexicon 

You can redirect the output to a file, if you want to:

boud@calcifer:~/prj/drift> drift phonology lexicon > something.ut8

If you want to create your own phonology, then you should carefully read the example phonology and lexicon files. They tell you everything you need to know.


Drift is unmaintained, unloved hackware. You are free to hack around. If you want to send me patches, make sure you have a working unittest for it. Look at for example tests. Run the unittests with a simple:

boud@calcifer:~/prj/drift> python
testComplexRules (__main__.RuleTestCase) ... ok
testSimpleFinalSubstitution (__main__.RuleTestCase) ... ok
testSimpleInitialSubstitution (__main__.RuleTestCase) ... ok
testSimpleSubstitution (__main__.RuleTestCase) ... ok
testSetPhoneme (__main__.SyllableTestCase) ... ok
testSetPhoneme (__main__.WordTestCase) ... ok

Ran 6 tests in 14.213s


TODO (also known as known bugs):

  • Rules are not applied in order.
  • No provision yet for applying historical sound changes (would be just another file containing the same rules as used during word generation, and another pass in the generation game).
  • No provision for saving a lexicon and continuing at a later stage with it. Everything is regenerated every time.
  • Co-ordinated substitution doesn't work.
  • The rules-engine is brain-dead and dead naive. Have to brush up my algorithms.

DREAMS (also known as you do it):

  • Add multi-threaded dialect generation.
  • Add foreign language influence inserter.


  • Mark Rosenfelder -- for sounds.c
  • Ken St-Cyr -- for WordSynth
  • Yigal Duppen -- for several regexps I haven't used after all.
  • Jeffrey Henning -- for Langmaker