from os import popen
import os
import sys
def bfs10151():
  return (sys.platform in ('win32', 'cygwin'))

def bfs10153():
  return (sys.platform == 'darwin')

def bfs10154():
  return sys.platform.startswith('linux')

def bfs10155():
  if bfs10151():
    return 'win'
  elif bfs10153():
    return 'macosx'
  elif bfs10154():
    return 'linux'


def bfs10156():
  if bfs10151():
    return ('PROGRAMFILES(X86)' not in os.environ)

  assert (bfs10154() or bfs10153())
  return (bfs10157() in ('i386', 'i686'))

def bfs10157():
  return popen('uname -m').read().strip()

def bfs10160():
  if bfs10151():
    return ('PROGRAMFILES(X86)' in os.environ)

  assert (bfs10154() or bfs10153())
  return (bfs10157() in ('x86_64', 'ia64', 'amd64'))

