Unless I misunderstand your intention, I don't think that is possible. Pygame is made for desktop applications. Those cannot be magically embedded in a webpage (gtk3 has a neat trick in this area, but it's not very relevant to this discussion). If you want to create a game running in your browser, you should probably should check out javascript or something on top of it like pyjamas (pyjamas comes with a sample asteroid game).
--