sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #28465
[Question #254991]: ConfigParser Error in Sikuli
New question #254991 on Sikuli:
https://answers.launchpad.net/sikuli/+question/254991
Hi ,
I'm using the ConfigParser module in my sikuli script to fetch data from a testdata.txt file.
Here's my code :
from sikuli.Sikuli import *
import ConfigParser
#import os
#path = os.environ['Sikuli_Scripts']
class test():
def __init__(self):
data = ConfigParser.ConfigParser()
#data.read(path+'\\testdata\testdata.txt')
data.read('C:\\Automation\\testdata\testdata.txt')
self.configurationPackageName = data.get("section","configurationPckageName")
self.sourceFolder = data.get("section","sourceFolder")
def testMethod(self):
for i in self.sourceFolder:
print i
obj = test()
obj.testMethod()
:::::::::::::::::::::::::::the content of testdata.txt is below ::::::::::::::
[section]
configurationPackageName = Test Package
sourceFolder = \\192.168.15.23\sms_pri\Client
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
The same code snippet works well on eclipse IDE ..but i encounter [error] ConfigParser.NoSectionError ( No section: 'section' )
when executed via Sikuli IDE
I'm using Sikuli 1.0.1
I'm still unable to resolve this issue ..any help/suggestion would be appreciated
Thanks
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.