Use string formatting :
msglen = '%16s' %len(testmessage)
will return a 16-byte string, beginning with spaces. Send it over your connection and use int() to get the message length
Pierre -- http://mail.python.org/mailman/listinfo/python-list
Use string formatting :
msglen = '%16s' %len(testmessage)
Pierre -- http://mail.python.org/mailman/listinfo/python-list