I compiled the app locally using the web2py admin, edited the app.yaml
to upload *.pyc, then I uploaded the app to see if the compiled/*.pyc
worked and got the error.  I assumed that Google removed get_magic for
some reason, but I did not pursue it.

It would be interesting to skip get_magic and see if it loads.

Robin

On Oct 18, 6:52 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> Robin,
>
> If you could send me the exact error I will ask Guido. This must have
> a very easy fix.
>
> Massimo
>
> On Oct 18, 6:47 pm, Robin B <[EMAIL PROTECTED]> wrote:
>
> > When I uploaded compiled *.pyc and tried to run it, an error was
> > raised, something about imp.get_magic not existing.  It might be
> > possible to avoid imp.get_magic and get it loading, but I have not
> > tried that.  I did try putting the code into a dict, and that sped
> > things up.
>
> > Robin
>
> > On Oct 18, 5:55 pm, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > > Robin,
>
> > > is it sufficient to byte-code compile the app and make sure the pyc
> > > files (including gluon/*.pyc) are uploaded too or do we need to modify
> > > web2py?
>
> > > Massimo
>
> > > On Oct 18, 5:28 pm, yarko <[EMAIL PROTECTED]> wrote:
>
> > > > Sorry - I don't know about *.pyc files;  I assume they're not platform
> > > > dependent, so I'm assuming that uploading *.pyc files with your app
> > > > doesn't work (?).
>
> > > > How is the Django support on GAE handling this issue?
>
> > > > On Oct 18, 1:51 pm, Robin B <[EMAIL PROTECTED]> wrote:
>
> > > > > In compileapp.py, after reading, parsing, and compiling a model, view,
> > > > > or controller, if a .pyc cannot be written to disk, instead store the
> > > > > compiled code, by file name/function, in a global dict so that next
> > > > > request you can simply load the precompiled code directly from RAM.
>
> > > > > Since web2py does not have an environment (does not distinguish
> > > > > between development and production etc), the only way to update the
> > > > > cached code is to check the mtime of each file on every request which
> > > > > is wasteful in production where the code does not change, but not
> > > > > nearly as wasteful as repeatedly reading, parsing and compiling.
>
> > > > > Robin
>
> > > > > On Oct 18, 10:27 am, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > > > > > On Oct 18, 9:51 am, Robin B <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Web2py 'works' on appengine, but it is reading, parsing and 
> > > > > > > compiling
> > > > > > > the models, controllers, and views on *every* request causing all 
> > > > > > > the
> > > > > > > wasted CPU cycles.  Normally, web2py caches code as .pyc files, 
> > > > > > > but
> > > > > > > you cannot write the filesystem on appengine so nothing gets 
> > > > > > > cached by
> > > > > > > default.  It is trivial to cache the compiled code in a dict and 
> > > > > > > reuse
> > > > > > > it on the next request.
>
> > > > > > Could you explain more?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to