[HowTo] use configuration/parameter/option files

Created by RaiMan on on 2012-07-26

In cases, where it is not possible or does not make sense to give parameters and options to a Sikuli script via command line, there is a really convenient feature in Jython: ConfigParser

usage from https://answers.launchpad.net/sikuli/+question/204153 (thanks to pyCoder)


#inside script
import ConfigParser

config = ConfigParser.ConfigParser()
username = config.get('settings','username')
ipAddress = config.get('settings','ipAddress')

# setup your 'config.ini'

username = Bob Marley
ipAddress = 190.943.1

You might use any filenames you want