Just a quick question


(LethalSideP) #1

This is probably super simple for you guys…JEALOUS GRUMBLES

Anyway, my problem is with string to integer conversion. I’m creating lots of stuff in my script, and I’m keeping track of it all by using special naming conventions and numbers, you know stuff like


loopcount=1
(code here)
loopcount=loopcount+1

Anyway, I’m now trying to apply variables like these to object names. But the python API’s having none of it - it says the number’s an integer, the object name’s a string, and that’s that.

So does anyone have any idea how to convert an integer variable to string so that I can truncate it on the end of my string (ie. the object name)?

Thanks in advance, guys.
LethalSideParting


(eeshlo) #2

string = str(integer_variable)


(jms) #3

Or like that:

string='%s' % number

jm


(LethalSideP) #4

Perfect. Thanks guys, I really appreciate it.

LSP