It seems that the "form.py" needs to import "copy.py" while "copy.py" is importing "form.py"...
On 21 February 2010 20:42, flydutchman <[email protected]> wrote: > Hello, > > I'm a new comer. > I've install the Python, web.py and flup. I'm reading the Tutorial and > plan to run the 5-line application as follows: > ---------------------------------------------------------------- > import web > > urls = ( > '/', 'index' > ) > > app = web.application(urls, globals()) > > class index: > def GET(self): > return "Hello, world!" > > if __name__ == "__main__": app.run() > ---------------------------------------------------------------- > > However, when I run it as: python code.py, some error occurs. The > trace is: > ---------------------------------------------------------------- > Traceback (most recent call last): > File "/afs/informatik.uni-goettingen.de/user/t/txu/workspace/Test/ > src/Application/copy.py<http://informatik.uni-goettingen.de/user/t/txu/workspace/Test/%0Asrc/Application/copy.py>", > line 3, in <module> > import web > File "/usr/local/lib/python2.6/dist-packages/web/__init__.py", line > 15, in <module> > import template, form > File "/usr/local/lib/python2.6/dist-packages/web/form.py", line 6, > in <module> > import copy, re > File "/afs/informatik.uni-goettingen.de/user/t/txu/workspace/Test/ > src/Application/copy.py<http://informatik.uni-goettingen.de/user/t/txu/workspace/Test/%0Asrc/Application/copy.py>", > line 9, in <module> > app = web.application(urls, globals()) > AttributeError: 'module' object has no attribute 'application' > --------------------------------------------------------------- > > It seems that the "import copy, re" in form.py has some problem. > I think this must be a very simple question and I am so stupid that I > cannot figure it out. > Can anybody help me? > > Best, > Tianyin -- Tianyin XU, ( 徐天音 ) State Key Laboratory for Novel Software Technology Department of Computer Science and Technology, Nanjing University No. 22, Hankou Road, Nanjing 210093, P. R. China Homepage. http://cs.nju.edu.cn/dislab/xuty/xuty.html -- You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en.
