Wow! That was enormously helpful. Thanks!

One further question: I have the lexer/parser in optimized mode, in
order to increase the startup speed of the program. Is there any way,
past neutering the ply source code, to stop it from writing tables if
not run in optimized mode? IFAIK, the disabled checks in ply give me
much more of a speedup than just hte -O mode. The problem is that when
it tries to write the tables, it can't open the files in "w" mode
(they're installed in /usr) and so it crashes. Right now, I have the
code neutered - if it fails to write the tables, it just silently
swallows the exception. This isn't the best solution. Is there a
better one?

On May 23, 10:23 pm, Bart Whiteley <[email protected]> wrote:
> On Sat, May 23, 2009 at 12:15 PM, Pavel Panchekha
>
>
>
> <[email protected]> wrote:
>
> > I've written a rather large application with ply as the parser, and it
> > works pretty well. The problem now is that I now want to redistribute
> > my application, and thus I want to ship precompiled parser tables.
> > Now, I'm currently compiling the optimized-mode lexer and parser
> > tables, and I specify what directory the tables are supposed to be.
> > Now, when I install ply to /usr/local, the program works, but
> > unfortunately recompiles the tables every time. This isn't too great,
> > because this can take a few seconds.
>
> > Now, if I make the directory that I've specified as outputdir world-
> > writable (0777), ply will put tables there, but will constantly
> > recompile them. So it can find the files there, but it isn't using
> > them.
>
> > Do I need to copy over .pyc files over, too? Do I need to pass magic
> > arguments to ply?
>
> I think this has been covered before once or twice on this list.  Try
> this thread, as well as another thread or two linked from within it:
>
> http://groups.google.com/group/ply-hack/browse_frm/thread/925c8062a9d...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to