As far as I can find from googling there isn't any easy way to use hardware PWM from python.
There does seem to be a few ways like PiGPIO, WiringPi and RPIO from the ZeroGPIO library all of them seem to need a root user and or running a deamon or installing packages not part of a standard OS install.
I coach beginners and teenage kids so prefer not to use root user or try to get them installing extra packages.
We have been playing with IR transmitters and receivers. The IR receiver will only receive IR light flashing at 38khz at 30% duty so the transmitter must be able to switch on/off at 38khz or the receiver just won't see it.
For the moment I have got around the problem by using a 555 timer to generate the 38khz square wave to send to the IR LED, see below pic. This make it easy to program sending the NEC protocol code in python(just switch the wire connected to the rest pin of the 555 timer on and off using time.sleep to generate the code).
I do find it frustrating that the RPi has got hardware PWM but I can't find a beginner way of using it. Am I missing something ????