I am completely new in the field of programming Python and Ignition Scripting.
I have a piece of code that I am trying to understand.
Please help me out if you can,
address = “”
def getSLCFile( address ):
end_char = address.index(’:’)
return address[:end_char]
You should get a ValueError, since the colon isn’t in the string passed to your function. See this documentation for string methods in jython.
Also, please edit your posts to format your code. Use triple backquotes on separate lines above and below a code block to make it format neatly. It is hard to follow python code when the indentation isn’t visible.