Re: pyparsing frames and tweens - take 2

2007-11-05 Thread Paul McGuire
Here is a first cut at processing the parsed objects, given a list of Property objects representing the frames at each '#': class Property(object): def __init__(self,**kwargs): self.__dict__.update(kwargs) def copy(self): return Property(**self.__dict__) @staticmethod

Re: pyparsing frames and tweens - take 2

2007-11-05 Thread Paul McGuire
Donn - The exception you posted is from using an old version of pyparsing. You can get the latest from SourceForge - if you download the Windows binary install, please get the docs package too. It has a full doc directory (generated with epydoc), plus example scripts for a variety of applications

pyparsing frames and tweens - take 2

2007-11-05 Thread Donn Ingle
Paul, > frame = Literal("#") > tween = Word("-") # that is, it is a "word" composed of 1 or more -'s > copy = Literal("=") > blank = Literal("_") > > animation = OneOrMore((frame + Optional( > (tween + FollowedBy(frame)) | > OneOrMore(copy | blank) ) ) ) I found that this form insists on having