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.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to