Hi I am trying to code a small script to take in 6 chars (for transmission across a wire). At the other end I am trying to unencode. Here is my script val1 = ord((raw_input("Enter char 1: ")) val2 = ord((raw_input("Enter char 2: ")) val3 = ord((raw_input("Enter char 3: ")) val4 = ord((raw_input("Enter char 4: ")) val5 = ord((raw_input("Enter char 5: ")) val6 = ord((raw_input("Enter char 6: ")) mask = 255 tot = (((((((((val1 << + val2) << + val3) << + val4) << + val5) << + val6 char6 = tot & mask temp = tot - char6 >> 8 char5 = temp & mask temp = temp - char5 >> 8 char4 = temp & mask temp = temp - char4 >> 8 char3 = temp & mask temp = temp - char3 >> 8 char2 = temp & mask temp = temp - char2 >> 8 char1 = temp & mask print chr(char1) print chr(char2) print chr(char3) print chr(char4) print chr(char5) print chr(char6) However when i try and run this i get some problems. I have a python warning and then when i use the chars a b c d e f i only receive back out c d e f That is to say the first two chars in and hence the last two out and blank ANy ideas? Thanks Eddie |