![](https://secure.gravatar.com/avatar/88367add5276f1f33220f7463149dd88.jpg?s=120&d=mm&r=g)
The 'struct' module allows packing and unpacking orders to be specified, but doesn't provide a hook to report on the order used by the machine the script is running on. As I'm likely going to be using this module in future runs of my course, I'd like to add 'struct.getorder()', which would return either "<" or ">" (the characters used to signal little-endian and big-endian respectively). Does this duplicate something in some other standard module? Does it seem like a sensible idea? Thanks Greg ----------------------------------------------------------------------------------------------------------------- The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Baltimore Technologies plc will not be liable for direct, special, indirect or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on. In addition, certain Marketing collateral may be added from time to time to promote Baltimore Technologies products, services, Global e-Security or appearance at trade shows and conferences. This footnote confirms that this email message has been swept by Baltimore MIMEsweeper for Content Security threats, including computer viruses.
![](https://secure.gravatar.com/avatar/4f1bdb13d00c0dc4355e24349d61e107.jpg?s=120&d=mm&r=g)
Greg Wilson writes:
The 'struct' module allows packing and unpacking orders to be specified, but doesn't provide a hook to report on the order used by the machine the
Python 2.0 introduced sys.byteorder; check it out: http://www.python.org/doc/current/lib/module-sys.html -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Digital Creations
participants (2)
-
Fred L. Drake, Jr.
-
Greg Wilson