My dum is in a cage with sliding glass doors. They can slide them open without the lock but I would be surprised if a snake could ever manage to lift the entire piece of glass and pop it out. I could see them getting a corner up but the glass wont come out that way.
My snake is almost 7ft and I've had no problems at all.
If your really that worried the pencil option sounded like a good one.
-----
Jason