# Path: classes/conf.py
# class Conf:
# 	def __init__(self):
# 		self.home = os.path.expanduser('~')
# 		if 'root' in self.home:
# 			self.home = '/home/'+os.path.expanduser(os.environ["SUDO_USER"])
# 		self.conf_folder = self.home+'/.openplotter'
# 		self.data_conf = ConfigParser.SafeConfigParser()
# 		self.read()
# 
# 	def read(self):
# 		self.data_conf.read(self.conf_folder+'/openplotter.conf')
# 
# 	def write(self):
# 		with open(self.conf_folder+'/openplotter.conf', 'wb') as configfile:
# 			self.data_conf.write(configfile)
# 
# 	def get(self, section, item):
# 		result = ''
# 		try:
# 			result = self.data_conf.get(section, item)
# 		except ConfigParser.NoSectionError:
# 			self.read()
# 			try:
# 				self.data_conf.add_section(section)
# 			except ConfigParser.DuplicateSectionError: pass
# 			self.data_conf.set(section, item, '')
# 			self.write()
# 		except ConfigParser.NoOptionError:
# 			self.set(section, item, '')
# 		return result
# 
# 	def set(self, section, item, value):
# 		self.read()
# 		try:
# 			self.data_conf.set(section, item, value)
# 		except ConfigParser.NoSectionError:
# 			self.data_conf.add_section(section)
# 			self.data_conf.set(section, item, value)
# 		self.write()
# 
# 	def has_option(self, section, item):
# 		return self.data_conf.has_option(section, item)
# 
# 	def has_section(self, section):
# 		return self.data_conf.has_section(section)
# 
# 	def add_section(self, section):
# 		return self.data_conf.add_section(section)
# 
# Path: classes/language.py
# class Language:
# 
# 	def __init__(self, conf):
# 
# 		home = conf.home
# 		op_folder = conf.get('GENERAL', 'op_folder')+'/openplotter'
# 		locale_folder = home+op_folder+'/locale'
# 		language = conf.get('GENERAL', 'lang')
# 
# 		gettext.install('openplotter', locale_folder, unicode=False)
# 		presLan_en = gettext.translation('openplotter', locale_folder, languages=['en'])
# 		presLan_ca = gettext.translation('openplotter', locale_folder, languages=['ca'])
# 		presLan_es = gettext.translation('openplotter', locale_folder, languages=['es'])
# 		presLan_fr = gettext.translation('openplotter', locale_folder, languages=['fr'])
# 		presLan_nl = gettext.translation('openplotter', locale_folder, languages=['nl'])
# 		presLan_de = gettext.translation('openplotter', locale_folder, languages=['de'])
# 		presLan_it = gettext.translation('openplotter', locale_folder, languages=['it'])
# 		presLan_eu = gettext.translation('openplotter', locale_folder, languages=['eu'])
# 		presLan_gl = gettext.translation('openplotter', locale_folder, languages=['gl'])
# 
# 		if language=='en':presLan_en.install()
# 		if language=='ca':presLan_ca.install()
# 		if language=='es':presLan_es.install()
# 		if language=='fr':presLan_fr.install()
# 		if language=='nl':presLan_nl.install()
# 		if language=='de':presLan_de.install()
# 		if language=='it':presLan_it.install()
# 		if language=='eu':presLan_eu.install()
# 		if language=='gl':presLan_gl.install()


import matplotlib.pyplot as plt
import sys
from classes.conf import Conf
from classes.language import Language
#!/usr/bin/env python

# This file is part of Openplotter.
# Copyright (C) 2015 by sailoog <https://github.com/sailoog/openplotter>
# 					  e-sailing <https://github.com/e-sailing/openplotter>
# Openplotter is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# any later version.
# Openplotter is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Openplotter. If not, see <http://www.gnu.org/licenses/>.

edit = sys.argv[1]

conf = Conf()
Language(conf)
data = conf.get('SPI', 'value_' + str(edit))

# Path: classes/conf.py
# class Conf:
# 	def __init__(self):
# 		self.home = os.path.expanduser('~')
# 		if 'root' in self.home:
# 			self.home = '/home/'+os.path.expanduser(os.environ["SUDO_USER"])
# 		self.conf_folder = self.home+'/.openplotter'
# 		self.data_conf = ConfigParser.SafeConfigParser()
# 		self.read()
# 
# 	def read(self):
# 		self.data_conf.read(self.conf_folder+'/openplotter.conf')
# 
# 	def write(self):
# 		with open(self.conf_folder+'/openplotter.conf', 'wb') as configfile:
# 			self.data_conf.write(configfile)
# 
# 	def get(self, section, item):
# 		result = ''
# 		try:
# 			result = self.data_conf.get(section, item)
# 		except ConfigParser.NoSectionError:
# 			self.read()
# 			try:
# 				self.data_conf.add_section(section)
# 			except ConfigParser.DuplicateSectionError: pass
# 			self.data_conf.set(section, item, '')
# 			self.write()
# 		except ConfigParser.NoOptionError:
# 			self.set(section, item, '')
# 		return result
# 
# 	def set(self, section, item, value):
# 		self.read()
# 		try:
# 			self.data_conf.set(section, item, value)
# 		except ConfigParser.NoSectionError:
# 			self.data_conf.add_section(section)
# 			self.data_conf.set(section, item, value)
# 		self.write()
# 
# 	def has_option(self, section, item):
# 		return self.data_conf.has_option(section, item)
# 
# 	def has_section(self, section):
# 		return self.data_conf.has_section(section)
# 
# 	def add_section(self, section):
# 		return self.data_conf.add_section(section)
# 
# Path: classes/language.py
# class Language:
# 
# 	def __init__(self, conf):
# 
# 		home = conf.home
# 		op_folder = conf.get('GENERAL', 'op_folder')+'/openplotter'
# 		locale_folder = home+op_folder+'/locale'
# 		language = conf.get('GENERAL', 'lang')
# 
# 		gettext.install('openplotter', locale_folder, unicode=False)
# 		presLan_en = gettext.translation('openplotter', locale_folder, languages=['en'])
# 		presLan_ca = gettext.translation('openplotter', locale_folder, languages=['ca'])
# 		presLan_es = gettext.translation('openplotter', locale_folder, languages=['es'])
# 		presLan_fr = gettext.translation('openplotter', locale_folder, languages=['fr'])
# 		presLan_nl = gettext.translation('openplotter', locale_folder, languages=['nl'])
# 		presLan_de = gettext.translation('openplotter', locale_folder, languages=['de'])
# 		presLan_it = gettext.translation('openplotter', locale_folder, languages=['it'])
# 		presLan_eu = gettext.translation('openplotter', locale_folder, languages=['eu'])
# 		presLan_gl = gettext.translation('openplotter', locale_folder, languages=['gl'])
# 
# 		if language=='en':presLan_en.install()
# 		if language=='ca':presLan_ca.install()
# 		if language=='es':presLan_es.install()
# 		if language=='fr':presLan_fr.install()
# 		if language=='nl':presLan_nl.install()
# 		if language=='de':presLan_de.install()
# 		if language=='it':presLan_it.install()
# 		if language=='eu':presLan_eu.install()
# 		if language=='gl':presLan_gl.install()


# Path: show_raw_adc_convert.py
import matplotlib.pyplot as plt
import sys
from classes.conf import Conf
from classes.language import Language

#!/usr/bin/env python

# This file is part of Openplotter.
# Copyright (C) 2015 by sailoog <https://github.com/sailoog/openplotter>
# 					  e-sailing <https://github.com/e-sailing/openplotter>
# Openplotter is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# any later version.
# Openplotter is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Openplotter. If not, see <http://www.gnu.org/licenses/>.

edit = sys.argv[1]

conf = Conf()
Language(conf)
data = conf.get('SPI', 'value_' + str(edit))

listsave = []