Google is your friend:
textureSurface = pygame.image.load(path)
textureData = pygame.image.tostring(textureSurface,"RGB",1)
width = textureSurface.get_width()
height = textureSurface.get_height()
texture = glGenTextures(1)
glBindTexture(GL_TEXTURE_2D, texture)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, textureData)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
This is quite cross-compatible.
There are quite a few code samples (and complete OpenGL libraries (including mine)) on
pygame.org. As far as I know, most are cross-compatible.
Ian