The __version__ module is accessible via the sqlobject module.
1
'trunk'
(1, 5, 0, 'trunk', 0)
None
0
'1.5'
5
See the source for more information.