Now it works, but it en/decodes the string in all encodings.
I want to select the encoding freely, for example, something like this:
en1 = encoder('String One', 2)# for base64
en2 = encoder('String Two', 3)# for hex
#en3 = ....
#and so on
I don't understand, doesn't it work as expected ? Please describe the expected output of your program and, if it "doesn't work", why it doesn't produce the expected output, or if it raises an exception, which exception ?
it gets the value of "thing" and encodes it to all encodings at once.
its ok, but, I want the User select which encoding he needs the string to be encoded. sorry if i cant be more clear(because of language barrier, Im not an English speaker).
in other word:
i want to input encoding selectively:
Input 1: the string I want to Encode or decode
Input 2: one or two of the encodings in list "codes"
Output: Printing out the Encoded/Decoded String
@pyTony: I want to doing this in my mobile python(compatible with Python 2.2), and it has not all of the libraries