How to grab a variable from a block FUNCION and using on IronPython script? if it possible

  • FUNCTION Constant "10" -> VAR "LENT"

    BEGIN SCRIPT IronPython
    import sys
    import random
    import string

    LENT = int(LEN)
    	while 1:
    			def randomStringDigits(stringLength):
    				lettersAndDigits = string.ascii_letters + string.digits
    				return ''.join(random.choice(lettersAndDigits) for i in range(stringLength))
    			f=open("RANDOM.txt", "a+")
    			f.write(str(randomStringDigits(LENG)) + "\n")


  • Admin

    Variables are automatically declared in IronPython, so if you have a variable called MYVAR inside OB, in Ironpy you can simply type MYVAR and it will have the contents of your variable as a string. Remember though to only use names that are valid names in python too! So not like My#VaR!_able

  • Thank you so much @Ruri that work for me. I need it as int and I was using as string, what type of dummy i'm jajaja

Log in to reply