source: ibidas.py @ 6

Last change on this file since 6 was 6, checked in by marchulsman, 11 years ago

Add postgres code, fix setup.py

File size: 859 bytes
Line 
1from IPython.Shell import IPShellEmbed
2
3import container
4from container import iany,iall,imax,imin,inot,readfile,writefile,vector,table,scalar
5import config
6from db import postgres
7
8_ConfigDefault = {
9    "database.name":                "ibidas_test",
10    "database.user":                "marc",
11    "database.password":            "testibidas",
12    "database.host":                "127.0.0.1",
13    "database.port":                "5432",
14}
15
16print _ConfigDefault
17
18config = config.loadConfig('ibidas.ini',_ConfigDefault)
19
20
21print postgres
22conn = postgres.openConnection(config['database.host'],\
23            config['database.port'],config['database.name'],\
24            config['database.user'],config['database.password'])
25
26
27ipshell = IPShellEmbed(banner='Welcome to the IBIDAS system',exit_msg='IBIDAS shutting down ...')
28del ipshell.IP.user_ns['_']
29ipshell()
Note: See TracBrowser for help on using the repository browser.