Utility Mill Gets Imports
–
You now have access to the following libraries when you write a Utility Mill utility:
re, datetime, time, calendar, difflib, math, urllib, and random
Thus here’s the code for the Regex Evaluator utility:
regex=re.compile(REGEX)
matches=regex.finditer(TEXT)
for match in matches:
print 'Found "%s" at position %s' % (match.group(),match.start())
–
I also just made a text diff utility with the newly added libraries. Can you improve it?
If you haven’t checked out Utility Mill, go do so now. It’s a fast way to create web utilities. All that’s required from you is a small snippet of Python code to make something happen.
–





