Where I'm using PLY in Coopr, the parsetab.py file is deep in a hierarchy of source code. Thus, that directory wasn't on my import path.
On Oct 16, 4:00 pm, David Beazley <[email protected]> wrote: > The parsetab.py file created by PLY is supposed to be placed alongside your > other source code (hence easily available via import). If giving code away, > you would typically include the parsetab.py file along with your code so that > it doesn't have to be regenerated by PLY. Therefore, I consider this > behavior to be an intended feature, not a bug. I think there is a > "picklefile" argument to yacc() that writes the tables to a datafile using > pickle instead. That might be another option to consider. > > Cheers, > Dave > > On Oct 16, 2010, at 1:06 PM, Bill Hart wrote: > > > > > I think I found a work-around. PLY does do some interesting cache > > checking, but it does this by 'reading' the parse table file. Under > > the hood, this does an 'import', which means that a user needs to > > augment their sys.path environment if this file is stored in an out-of- > > the-way location!! > > > This sounds like a bug to me... > > > --Bill > > > On Oct 16, 10:20 am, Bill Hart <[email protected]> wrote: > >> PLY is used within the Coopr software, and a Coopr user recently noted > >> that the LR table was being repeatedly written. I've taken a look at > >> the code, and I don't see any caching logic. > > >> If the write_table option to the yacc() function is 1, then the table > >> gets written (this is the default). Otherwise, it looks like it's not > >> written. > > >> Is this correct? I think the intent was for the table signature to > >> provide a mechanism for detecting when no writing is necessary, but I > >> don't see that that logic in the code. > > > -- > > You received this message because you are subscribed to the Google Groups > > "ply-hack" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/ply-hack?hl=en. -- You received this message because you are subscribed to the Google Groups "ply-hack" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/ply-hack?hl=en.
