Question #217327 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/217327
Status: Open => Answered
RaiMan proposed the following answer:
ok, perfect.
This the Python for your workflow:
import random
# possible outer loop
lineIn = "wyorgb" # read next input line
colors = [lineIn[i] for i in range(len(lineIn))] # build colorlist from lineIn
random.seed() # reset randomizer
for i in range(len(lineIn)):
c = random.choice(colors)
colors.remove(c)
lineOut = ""
for c in colors: lineOut+=c # rebuild a string to output
print lineOut # write a color combination
if not colors: break
You can now add the file handling at the 2 points (read ..., write ...)
creating an additional outer loop
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp