Re: help converting some perl code to python

2005-11-04 Thread [EMAIL PROTECTED]
The '..' operator is the flip-flop operator in perl. (It is rarely used.) It is exactly the same as the 'range' type operator. It returns false until the first condition is met, then it returns true until the last condition met, then it returns false. You could create a flip-flop with a python clo

Re: help converting some perl code to python

2005-11-04 Thread Peter Otten
[EMAIL PROTECTED] wrote: > i need help with converting a piece of perl code to python > the problem is the '..' operator in perl. Is there any equivalent in > python? Here is a class that emulates the .. operator: import sys import re start, files, end = map(re.escape, ["[start]", "[files]",

Re: help converting some perl code to python

2005-11-04 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > the problem is the '..' operator in perl. Is there any equivalent in > python? I can't think of anything with a similar operation, to be honest. I'd try using while loops which look out for the next section delimiter. -- Ben Sizer. -- http://mail.python.org/mailman/l

Re: help converting some perl code to python

2005-11-04 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > the problem is the '..' operator in perl. Is there any equivalent in > python? any suggestions ? I have a suggestion: stop assuming we know perl, and explain what this '..' operator does. Sybren -- The problem with the world is stupidity. Not saying ther