source: ibidas2.py @ 130

Last change on this file since 130 was 130, checked in by pvkouteren, 11 years ago

postgres.py: Added logging of complete query and timing, added table replacement for views (although not active yet).
ibidas2.py: Added required lines for pointing Mac OS X to use readline.

File size: 1.2 KB
Line 
1""" For Mac (in this case Patrick's Mac): define where the gnureadline module is located """
2import sys
3sys.path.insert( 1, '/Library/Python/2.5/site-packages/readline-2.5.1-py2.5-macosx-10.5-i386.egg')
4""" End of gnureadline troubles """
5from IPython.Shell import IPShellEmbed
6
7import container
8from container import iany,iall,readfile,writefile, postgres
9import config
10
11_ConfigDefault = {
12    "database.name":                "ibidas",
13    "database.user":                "postgres",
14    "database.password":            "postgres",
15    "database.host":                "127.0.0.1",
16    "database.port":                "5432",
17}
18#
19#print _ConfigDefault
20#
21config = config.loadConfig('ibidas.ini',_ConfigDefault)
22#
23#
24#print postgres
25#conn = postgres.openConnection(config['database.host'],\
26#            config['database.port'],config['database.name'],\
27#            config['database.user'],config['database.password']).getConSet()
28#
29conn = postgres.openConnection(config['database.host'],\
30            config['database.port'],config['database.name'],\
31            config['database.user'],config['database.password']).getConSet()
32
33ipshell = IPShellEmbed(banner='Welcome to the IBIDAS system',exit_msg='IBIDAS shutting down ...')
34del ipshell.IP.user_ns['_']
35ipshell()
Note: See TracBrowser for help on using the repository browser.