On Jan 27, 2005, at 18:17, Bill Mill wrote:
I've never used buffer(); in fact, I didn't even know it existed, and I've been using python for a while now.
Instead of using buffer, just do:
sys.argv[1] = sys.argv[1][:255]
This says "Set the second element of sys.argv equal to its first 256 characters".
Also, I don't think you have to worry about buffer overflows in Python, unless you're using a seriously broken implementation of it.
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor