sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #13347
Re: [Question #209439]: Is there any inbuild func, that can be used to call Alphabets randomly..
Question #209439 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/209439
Status: Open => Answered
RaiMan proposed the following answer:
you should print before return ;-)
... better use this
import random
import string
class sdf():
def rand_string(self):
output = ''
length=5
chr_set = string.ascii_uppercase + string.digits
for n in range(length):
output = output + random.choice(chr_set)
return output
new = sdf()
print new.rand_string()
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.