Hello Massimo!, comments inline.
On Saturday, October 20, 2012 11:43:43 AM UTC-3, Massimo Di Pierro wrote:
>
> I am very puzzled but this. It should not be necessary. Does the code
> below work for you?
>
> $ python web2py.py -S welcome
> (InteractiveConsole)
> >>> import simplejson
>
If I use web2py.app(Mac OS) it doesn't work:
Silver-2:Resources keniobats$ pwd
/Users/keniobats/Downloads/web2py/web2py.app/Contents/Resources
Silver-2:Resources keniobats$ python web2py.py -S welcome
Traceback (most recent call last):
File "web2py.py", line 16, in <module>
import gluon.widget
ImportError: No module named gluon.widget
Silver-2:Resources keniobats$
If I use the source version it works well:
Silver-2:web2py 2 keniobats$ python web2py.py -S welcome
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2012
Version 2.0.9 (2012-09-13 23:51:30) stable
Database drivers available: SQLite(sqlite3), MySQL(pymysql),
PostgreSQL(pg8000), IMAP(imaplib)
WARNING:web2py:import IPython error; use default python shell
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import simplejson
>>>
>
> Do you have a module called simplejson in yourapp/modules/?
>
I have nothing but my facebook.py module there.
>
> From a normal python shell, shat happens if you do?
>
> >>> import simplejson
>
Silver-2:~ keniobats$ pwd
/Users/keniobats
Silver-2:~ keniobats$ python
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import simplejson
>>>
It works as usual :)
Hope it helps, thanks Massimo!
--