I have mada a config file for my python program.. The config file contains my variable which uses the 'i2cset' module.. It is as follows: This is my config file called'try.ini'
[new]
a = ('i2cset', '-y', '0', '0x20', '0x14', '0x01')
I read it from my main code as follows:
from ConfigParser import SafeConfigParser
parser=SafeConfigParser()
parser.read('try.ini')
def set21(tog=[0]):
tog[0]= not tog[0]
if tog[0]:
set0.config(text='p21_1')
A=parser.get('new', 'a')
subprocess.call(''.join(A), shell=True)
else:
set0.config(txt='p21_0')
But everytime I execute the main program I get an error saying :
/bin/sh: 1: 'i2cset ': not found.
I dont know why does this happen.. When I run the program without the config file it executes completley fine... Can somebody please help..
Kind Regards, Namita.