code: def fixcoord(self, x, y):
          u'''Return a long with x and y packed inside, 
          also handle negative x and y.'''
          if x < 0 or y < 0:
              info = CONSOLE_SCREEN_BUFFER_INFO()
              self.GetConsoleScreenBufferInfo(self.hout, byref(info))
              if x < 0:
                  x = info.srWindow.Right - x
                  y = info.srWindow.Bottom + y
  
          # this is a hack! ctypes won't pass structures but COORD is 
          # just like a long, so this works.
          return c_int(y << 16 | xf fixcoord(self, x, y):
          u'''Return a long with x and y packed inside, 
          also handle negative x and y.'''
          if x < 0 or y < 0:
              info = CONSOLE_SCREEN_BUFFER_INFO()
              self.GetConsoleScreenBufferInfo(self.hout, byref(info))
              if x < 0:
                  x = info.srWindow.Right - x
                  y = info.srWindow.Bottom + y
  
          # this is a hack! ctypes won't pass structures but COORD is 
          # just like a long, so this works.
          return c_int(y << 16 | x)
docs: u'''Return a long with x and y packed inside, 
          also handle negative x and y.