Massimo,
Thanks for your quick reply. For most part, web2py worked with IPython 
Notebook like DAL, which is pretty good.
My interest is to to reuse web2py for managing notebooks without developing 
Tornado apps myself as I am new to python and web2py.

W.

On Sunday, December 16, 2012 10:13:16 PM UTC-5, Massimo Di Pierro wrote:
>
> 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
>>
>

-- 



Reply via email to