Does anybody know?

I remember a movie that had a soliloquy similar to this:
In my short and merry life I have loved many.
(crowd murmurs)

But once, and only once, have I ever trusted a woman.
(crowd grows louder)

and that is why I stand here today!
(crowd erupts with howls and hoots)

It was delivered from the gallows.

Does anyone remember this?