I need a way to tell what mode the shell is in from within the shell.
While I\'m primarily an OS X user, I\'d be interested in knowing about other platforms as well.<
Try using ctypes to get the size of a void pointer:
import ctypes print ctypes.sizeof(ctypes.c_voidp)
It'll be 4 for 32 bit or 8 for 64 bit.