def get_display(spec):
 if (spec is None):
  return None
 elif isinstance(spec, six.string_types):
  return pyglet.canvas.Display(spec)
 else:
  raise error.Error('Invalid display specification: {}. (Must be a string like :0 or None.)'.format(spec))

def get_display ( spec ) : if ( spec is None ) : return None elif isinstance ( spec , six . string_types ) : return pyglet . canvas . Display ( spec ) else : raise error . Error ( 'Invalid display specification: {}. (Must be a string like :0 or None.)' . format ( spec ) )
convert a display specification into an actual display object .