Re: [web2py] Re: Problem with using a method from a module

2011-11-07 Thread Sathvik Ponangi
Thank you Bruno! I added commons.db = db to my controller to make db globally available in that module. Thanks again! With Regards, Sathvik On Mon, Nov 7, 2011 at 10:54 AM, Bruno Rocha wrote: > > > On Mon, Nov 7, 2011 at 2:55 AM, Sathvik Ponangi wrote: > >> Dear Massimo, >> Restarting AppEngin

Re: [web2py] Re: Problem with using a method from a module

2011-11-06 Thread Bruno Rocha
On Mon, Nov 7, 2011 at 2:55 AM, Sathvik Ponangi wrote: > Dear Massimo, > Restarting AppEngine seems to have fixed this as well. > But now I get an error saying that > >> NameError: global name 'db' is not defined > > How do import db.py onto the module? > You cant import db onto a module, db is

Re: [web2py] Re: Problem with using a method from a module

2011-11-06 Thread Sathvik Ponangi
Dear Massimo, Restarting AppEngine seems to have fixed this as well. But now I get an error saying that > NameError: global name 'db' is not defined How do import db.py onto the module? With Regards, Sathvik On Mon, Nov 7, 2011 at 1:28 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote:

[web2py] Re: Problem with using a method from a module

2011-11-06 Thread Massimo Di Pierro
Are you sure this is exactely your code? commons.FileSystem().get_file("Testing").split(",") On Nov 6, 11:57 am, Sathvik Ponangi wrote: > Hi, > >  I'm using Web2py (1.99.2_Stable) on GAE (1.5.5). > > I have the following class in a module named commons.py: > > > class FileSystem(): > > >     def

[web2py] Re: Problem with using a method from a module

2011-11-06 Thread Sathvik Ponangi
The code works fine when the class is a part of the controller itself, but not as a module...