On Jan 13, 2011, at 11:49 AM, Lorin Rivers wrote:
> 
> That's exactly the kind of user experience I want to avoid.

You could put a copy in web2py's site-packages, though it'd have to be the 
right version for the environment (or at least a compatible version).

You could put it in your app's modules directory, and use local_import to get 
it. Or something like this (I haven't checked the syntax; this is just the 
general idea):

try:
    import somemodule
except ImportError:
    local_import('somemodule')

...so as to get the host's version if it's present, and your backup version if 
not.

> 
> 
> On Jan 13, 2011, at 13:34 , Alexandre Andrade wrote:
> 
>> try to import, and if fails, generate message to user to install it on the
>> system
>> 
>> 
>> Alexandre Andrade
>> Hipercenter.com Classificados Gratuitos e Inteligentes
>> 
>> 
>> 
>> 2011/1/13 Lorin Rivers <lriv...@mosasaur.com>
>> 
>>> I am using tabular <http://www.parsemydata.com/tabular> (which requires
>>> numpy), as well as psycopg2 and a number of other libraries.
>>> 
>>> The default location for such things is one of the local site-packages
>>> directories, which of course, doesn't migrate to another machine
>>> automagically.
>>> 
>>> What's the best practice for this sort of thing?
>>> --
>>> Lorin Rivers
>>> Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
>>> <mailto:lriv...@mosasaur.com>
>>> 512/203.3198 (m)
>>> 
>>> 
>>> 
>> 
>> 
>> -- 
>> Atenciosamente



Reply via email to