2
# -*- coding: utf-8 -*-
4
# clicompanion.py - commandline tool.
6
# Copyright 2010 Duane Hinnen
8
# This program is free software: you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License version 3, as published
10
# by the Free Software Foundation.
12
# This program is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranties of
14
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15
# PURPOSE. See the GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License along
18
# with this program. If not, see <http://www.gnu.org/licenses/>.
24
CONFIGFILE = os.path.expanduser("~/.config/clicompanion/config")
29
create configuration file
32
def create_config(self):
34
if not os.path.exists(CONFIGFILE):
35
config = ConfigParser.ConfigParser()
36
# set a number of parameters
37
config.add_section("terminal")
38
config.set("terminal", "scrollb", 500)
39
config.set("terminal", "colorf", '#FFFFFF')
40
config.set("terminal", "colorb", '#000000')
41
config.set("terminal", "encoding", 'utf-8')
42
# Writing our configuration file
43
with open(CONFIGFILE, 'wb') as f: