command text parsing and hints displaying on user input.

Kent Johnson kent at kentsjohnson.com
Tue Oct 17 15:37:14 EDT 2006


Andy wrote:
> Hi guys,
> 
> I'm writing a program with a feature of accepting user input as command
> text and parsing it to correct function calls...example:
> 
> "5 minutes later"/"5 min later"/"5 minute later"/"after 5 minutes"...
> are being parsed as the same rule so the system will call a later
> function with minutes=5 as parameter.

Maybe one of these will help:
http://cheeseshop.python.org/pypi/parsedatetime/0.7.4
http://cheeseshop.python.org/pypi/when/1

Kent



More information about the Python-list mailing list