Unfortunately I am not sure you can run web2py with Ipython notebook. The reason is that the notebook is a web interface and the statements are executed server side. The notebook server may execute the statements in different threads (I am not sure but from the tracebacks that is what it looks like). The web2py modules assume no data is shared among threads since one tread serves one request at the time.
I would need to understand better the notebook concurrency model before this can be addressed. Massimo On Sunday, 16 December 2012 18:35:06 UTC-6, wwwgong wrote: > > I have watched video at https://vimeo.com/21185623 and try to use web2py > inside IPython Notebook, but run into > the following error: > > form = SQLFORM(db.ipynotebooks) > > ---------------------------------------------------------------------------AttributeError > Traceback (most recent call > last)<ipython-input-36-c6b1cb76b770> in <module>()----> 1 form = > SQLFORM(db.ipynotebooks) > D:\web2py_git\gluon\sqlhtml.pyc in __init__(self, table, record, deletable, > linkto, upload, fields, labels, col3, submit_button, delete_label, showid, > readonly, comments, keepopts, ignore_rw, record_id, formstyle, buttons, > separator, **attributes) 911 linkto=URL(f='table/db/') > 912 """--> 913 T = current.T 914 915 > self.ignore_rw = ignore_rw > AttributeError: 'thread._local' object has no attribute 'T' > > > I have created a gist at http://nbviewer.ipython.org/4314583/ > > Thanks, > W > --

