On Tue, Sep 18, 2018 at 8:04 AM, rahul kumar <[email protected]> wrote:
> You do not have variable defined within the function or at the global > <http://net-informations.com/python/iq/global.htm> level. > > > On Monday, September 15, 2008 at 11:05:57 AM UTC+5:30, chienr wrote: >> >> Hi, >> >> I'm new to web.py and have been struggling with this problem for the >> past day. I hope someone can point me to where the problem is. I have >> a for loop in a template like this: >> >> $for line in lines: >> $csv = line.rstrip().split(",") >> >> But it's generating this error: >> >> <type 'exceptions.NameError'> at /home >> global name 'csv' is not defined >> >> What does it mean? >> > The web.py templates are a a bit sensitive to space. You need to add a space after the $ $ csv = line.rstrip().split(",") Anand -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/webpy. For more options, visit https://groups.google.com/d/optout.
