Last change
on this file was b68ae8d, checked in by Marko <Marko@…>, 2 years ago |
Created spring app, edited setec_scrapper
|
-
Property mode
set to
100644
|
File size:
434 bytes
|
Line | |
---|
1 | import configparser
|
---|
2 |
|
---|
3 | def get_databaseconfig(filename):
|
---|
4 | cf = configparser.ConfigParser()
|
---|
5 | cf.read(filename) # Read configuration file
|
---|
6 | # Read corresponding file parameters
|
---|
7 | _database = cf.get("Database1", "database")
|
---|
8 | _host = cf.get("Database1", "hostname")
|
---|
9 | _username = cf.get("Database1", "username")
|
---|
10 | _pwd = cf.get("Database1", "pwd")
|
---|
11 | return _database, _host, _username, _pwd # return required parameters |
---|
Note:
See
TracBrowser
for help on using the repository browser.