_rpiLoaded = False
print('This platform does not support RPi.GPIO... Will mock it instead.')
# TODO: Change print order, so the function name goes first.
class PWMProxy():
def __init__(self, channel, frequency, debug=False):
self.pwm = GPIO.PWM(channel, frequency) if _rpiLoaded else None
https://github.com/tomvik/Pi-4WD-Smart-Robot/blob/bdda1f302c748eef59746c36f1bdc932f89ac0ba/Python/src/RPI/GPIOProxy.py#L13