Below is the file 'demo.py' from this revision. You can also download the file.

#!/usr/bin/env python

# fourstar API demo

from System import System
from Chart import Chart
from ChartRender import ChartRender
from SystemInterface import SystemInterface
from ChartInterface import ChartInterface
from LedgerInterface import LedgerInterface
from JournalInterface import JournalInterface
from States import *

#

print "Hello Cruel World!"


import ConfigParser
import sys, os, string, re, pwd, signal, math, syslog
import logging, logging.handlers
from traceback import format_tb
from time import time, sleep, mktime, localtime

class Demo_State:
	def __init__(self,v):
		pass

v = System()
vstatus = Demo_State(v)

print v.connected
v.connect_store("/tmp/foo.db")
print v.connected

c = Chart(v)
id = c.create("hello",True,"world")
print id
print c.details(id)
print c.list()

r = ChartRender(c)
r.render("text",[id])

r.render("text",c.list())