Mercurial > parpg-app
annotate parpg.py @ 6:0897c89da4fe
Using fife settings module again instead of our own.
author | Beliar <KarstenBock@gmx.net> |
---|---|
date | Mon, 20 Feb 2012 16:50:10 +0100 |
parents | 8da675d9f525 |
children | 21714c459078 |
rev | line source |
---|---|
6
0897c89da4fe
Using fife settings module again instead of our own.
Beliar <KarstenBock@gmx.net>
parents:
5
diff
changeset
|
1 #!/usr/bin/env python |
4
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
2 # This program is free software: you can redistribute it and/or modify |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
3 # it under the terms of the GNU General Public License as published by |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
4 # the Free Software Foundation, either version 3 of the License, or |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
5 # (at your option) any later version. |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
6 |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
7 # This program is distributed in the hope that it will be useful, |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
10 # GNU General Public License for more details. |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
11 |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
12 # You should have received a copy of the GNU General Public License |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
13 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
14 |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
15 #TODO: Modularize this script |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
16 import sys |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
17 from optparse import OptionParser |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
18 from os import path |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
19 |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
20 from parpg.main import main |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
21 |
6
0897c89da4fe
Using fife settings module again instead of our own.
Beliar <KarstenBock@gmx.net>
parents:
5
diff
changeset
|
22 usage = ('usage: %prog [options]' |
4
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
23 'Example: python %prog .') |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
24 |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
25 parser = OptionParser(description='PARPG Launcher Script', usage=usage) |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
26 parser.add_option('-f', '--logfile', |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
27 help='Name of log file to save to') |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
28 parser.add_option('-l', '--loglevel', default='critical', |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
29 help='desired output level for log file') |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
30 opts, args = parser.parse_args() |
6ad756581ef1
Added parpg.py and a default configuration.
KarstenBock@gmx.net
parents:
diff
changeset
|
31 |
6
0897c89da4fe
Using fife settings module again instead of our own.
Beliar <KarstenBock@gmx.net>
parents:
5
diff
changeset
|
32 main(args, opts) |