Thanks Yarko, but that gives me the same error as before.

On Jul 27, 2:14 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> On Mon, Jul 27, 2009 at 3:40 PM, Dan <danbr...@gmail.com> wrote:
>
> > Is the appropriate solution to put the library code in web2py/ and use
> > this import statement?
> > from GChartWrapper import *
>
> > that seems to work, but I'd prefer to have the library in web2py/
> > applications/myapp/modules/
>
> then you will need to use something like:
>
> from applications.myapp.modules.GChartWrapper import *
>
>
>
> > On Jul 27, 12:24 pm, Dan <danbr...@gmail.com> wrote:
> > > Hello-
> > > I'd like to use some google charts (http://code.google.com/apis/
> > > chart/) in my web2py app. Instead of creating the URLs manually, I
> > > would prefer to use a wrapper library, and this one looks like a good
> > > candidate:http://code.google.com/p/google-chartwrapper/
>
> > > So I tried to put the code from that library in the /web2py/
> > > applications/myapp/modules/ directory and then import it in my
> > > controller, like this ...
>
> > > exec('from applications.%s.modules import
> > > GChartWrapper'%request.application)
>
> > > ... but I get this error:
>
> > >   File ".../modules/GChartWrapper/__init__.py", line 1, in <module>
> > >     from GChartWrapper.GChart import *
> > > ImportError: No module named GChartWrapper.GChart
>
> > > Is there a proper way to import this kind of library? Or do I need to
> > > make changes to the library's __init__.py file and other files?
>
> > > thanks,
> > > Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to