Socket Attributes

Thanks Carl. I’ll explore the non-blocking stuff eventually on another PC, but for now it works great.

Another question: What is the default encoding in Ignition? The only thing I had to change in my code was how the byte conversion was handled. In the top example, this is how it works when developed in the Eclipse environment; in the bottom example, to get the same output in Ignition, I had to add the [-3:] (my goal is to output the literal hex value as a two character string, i.e 32=‘20’):

a=[]
for i in range(-10,10):
	a.append(i)

Output = ''.join( [ "%02X " % ord( x ) for x in a ] ).strip()

print Output, '\n'


a=[]
for i in range(-10,10):
	a.append(i)

Output = ''.join( [ ("%02X " % ord( x ))[-3:] for x in a ] ).strip()

print Output

I don’t think it has anything to do with the jython version, because I have to add the [-3:] when I run the code in the Netbeans environment as well. I’ve tweaked very encoding setting I could find in Netbeans, but it didn’t make a difference. I can live with it, since the [-3:] is redundant if the output comes out as two characters anyway, but it’s more of a curiousity factor since I will be doing a lot of text manipulation in the future. Just want to understand what’s going on.