1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pyterm: make config file name a variable

This commit is contained in:
Oleg Hahm 2014-03-25 17:05:07 +01:00
parent 5769269cda
commit e1f8992642

View File

@ -8,8 +8,10 @@ except ImportError:
import cmd, serial, sys, threading, readline, time, logging, os, codecs
### set some default options
defaultport = "/dev/ttyUSB0"
pytermdir = os.environ['HOME'] + os.path.sep + '.pyterm'
configfile = "pyterm.conf"
class SerCmd(cmd.Cmd):
@ -116,7 +118,7 @@ class SerCmd(cmd.Cmd):
def load_config(self):
self.config = configparser.SafeConfigParser()
self.config.read([pytermdir + os.path.sep + 'pyterm.conf'])
self.config.read([pytermdir + os.path.sep + configfile])
for sec in self.config.sections():
if sec == "aliases":