There is a problem with making reportlab an appliance.

Some modules internally use relative paths, some use absolute paths.

If they use relative paths, it does not matter where the are located.
They can be, for example, into an appliance. All current web2py
modules use relative paths thus web2py never alters sys.path.

If they use absolute paths (like reportlab does) they must be located
in a folder that is listed in sys.path. An app cannot alter sys.path
because that is not completely thread safe.

One solution would be to give web2py it's own site-packages folder
where apps can install-uninstall additional global modules.
This would be fine for users running the windows binary distribution
but I am sure anybody running from source will oppose it.

In order to include reportlab in web2py I would have to append gluon/
contrib to sys.path.

Massimo

On Dec 26, 8:18 am, dhmorgan <[email protected]> wrote:
> I like ReportLab and think of PDF generation as a necessary component.
> I also know it took some time to get a handle on using it. I wouldn't
> worry about how much size it adds as much as the overhead of making
> and keeping it easy to use. Seems that it should be an appliance
> rather than something built into web2py.
>
> On Dec 24, 11:23 am, pmate <[email protected]> wrote:
>
> > Pisa is really nice, but i'm totally pro reportlab.
> > It's true that it is a little heavy but it's a great solution for
> > printing in web2py
>
> > Paolo
>
> > On Dec 24, 3:36 pm, Timothy Farrell <[email protected]> wrote:
>
> > > Just like you would normally run a long-running process in web2py, 
> > > os.spawn is my favorite (python offers numerous methods).
> > > But...do we really want a framework that installs software on demand 
> > > (without prompting an admin)?  I say, let's just leave it to the humans.  
> > > It's one thing to make someone's life easier, it's another to allow them 
> > > to get away from a process that they should know about and control (like 
> > > messing with IP tables programmatically).
> > > Further driving the point, easy_install installs the latest version of a 
> > > package.  When I did this, it broke form-encode for me.
> > > -tim
> > > mdipierro wrote:is it possible to call easy_install programmatically? Can 
> > > anybody point me to an example? Massimo On Dec 23, 4:21 pm, Timothy 
> > > Farrell<[email protected]>wrote:easy_install reportlab dang, that's 
> > > easy! ;-) mr.freeze wrote:It would be nice to have a feature system that 
> > > allows either manual uploading (similar to the application upload) or 
> > > on-demand downloading of components like ReportLab so that each person 
> > > could customize their installation as they see fit. Just daydreaming out 
> > > loud. It would probably be difficult to implement and maintain. 
> > > Components like these are very useful but probably shouldn't be included 
> > > in the framework by default in my opinion. Nathan On Dec 23, 12:41 
> > > pm,mdipierro<[email protected]>wrote:Should we include reportlab in 
> > > web2py? pros: web2py lacks printing capability and pdf output may be a 
> > > solution the license allows it cons: it doubles the size of web2py there 
> > > are alternative such as the openoffice APIs it requires creating a 
> > > site-package folder and add it the path Comments? Massimo-- Timothy 
> > > Farrell<[email protected]>Computer Guy Statewide General Insurance 
> > > Agency (www.swgen.com)-- Timothy Farrell<[email protected]>Computer Guy 
> > > Statewide General Insurance Agency (www.swgen.com)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to