I need a way to tell what mode the shell is in from within the shell.
I've tried looking at the platform module but it seems only to tell you about "about the bit architecture and the linkage format used for the executable": the binary is compiled as 64bit though (I'm running on OS X 10.6) so it seems to always report 64bit even though I'm using the methods described here to force 32bit mode).
Grouping everything...
Considering that:
I'm going to exemplify on all 3 platforms. I'll be using Python3 and Python2. Doc URLs however, will be Python3 specific.
0x100000000
(2 ** 32
): greater for 64bit, smaller for 32bit:sizeof(void*)
):sizeof(void*)
). As a note, ctypes uses #2. (not necessarily for this task) via "${PYTHON_SRC_DIR}/Lib/ctypes/__init__.py" (around line #15):Win specific: