Configuration » History » Version 2
Aurynn Shaw, 01/22/2009 09:38 AM
1 | 1 | Aurynn Shaw | |
---|---|---|---|
2 | 2 | Aurynn Shaw | h1. Configuring Simpycity |
3 | 1 | Aurynn Shaw | |
4 | 2 | Aurynn Shaw | |
5 | |||
6 | h2. Settings |
||
7 | |||
8 | |||
9 | 1 | Aurynn Shaw | Configuring Simpycity is designed to be very quick, to get and stay out of your way. |
10 | |||
11 | 2 | Aurynn Shaw | As in [[AQuickTutorial]], configuration of Simpycity is very fast: |
12 | <pre> |
||
13 | 1 | Aurynn Shaw | >>> from simpycity import config |
14 | >>> config.host = 'localhost' |
||
15 | >>> config.port = 5432 |
||
16 | >>> config.user = 'user' |
||
17 | >>> config.password = 'password' |
||
18 | >>> config.database = 'dbname' |
||
19 | 2 | Aurynn Shaw | </pre> |
20 | 1 | Aurynn Shaw | |
21 | All parameters are named as you'd expect, and all settings are effectively global for all future Simpycity constructs. |
||
22 | |||
23 | |||
24 | 2 | Aurynn Shaw | h2. Debugging |
25 | |||
26 | |||
27 | 1 | Aurynn Shaw | Simpycity also supports outputting some debugging information, which can be useful in figuring out exactly why things aren't working properly. |
28 | |||
29 | Debugging is turned on via |
||
30 | 2 | Aurynn Shaw | <pre> |
31 | 1 | Aurynn Shaw | >>> config.debug = True |
32 | 2 | Aurynn Shaw | </pre> |
33 | 1 | Aurynn Shaw | |
34 | Unfortunately, it's not using Python logging systems yet, so everything is just printed to stdout and there's no concept of logging levels. |