Popping and probing are the only two reliable methods to sex a python. Essentially, both methods are used to determine the presence of the hemipenes. Both methods should be performed by someone experienced such as a breeder or vet as they can both harm your snake if done improperly.
With popping, pressure is applied at the base of the tail until the hemipenes are extruded from the cloaca. Proping is done by sliding a blunt rod, or probe, into the cloaca towards the tail and count the depth in number of scales.
You can find much more information about both methods by searching for "popping and probing".