Stefan Scholl <[email protected]> wrote:
> Maybe this was a bad app to test the shell problem. There's a
>
> I'll make a cleaner testcase later.
On MacOS X 10.7, with Mac version of Web2py:
OK, new and simple app, SQLite, web2py 1.99.7. In db.py I define
a table "foo": db.define_table('foo', Field('something'))
Filled it in the database administrator interface.
In the shell:
x = db().select(db.foo.ALL)
and nothing. No output.
Then I enter just "x" + return. Nothing.
Next: "print x". Now I get something. And when I now just enter
"x" I get an output, too.
Transcript:
----->
web2py Shell (1, 99, 7, datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable')In
[1] : print x
[<Row {'id': 1, 'something': 'hello'}>, <Row {'id': 2, 'something': 'world'}>]
In [2] : x
[<Row {'id': 1, 'something': 'hello'}>, <Row {'id': 2, 'something': 'world'}>]
<-----
Conclusion: Not a serious bug. It just doesn't output anything
for the query and the variable, unless it has printed something
with "print" before.
Next test: Start the shell again, print something and then make
the query again:
----->
web2py Shell (1, 99, 7, datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable')In
[1] : print "some test"
some test
In [2] : x
[<Row {'id': 1, 'something': 'hello'}>, <Row {'id': 2, 'something': 'world'}>]
<-----
No output for the query, but I get at least "x".
Overall conclusion: Queries in the web2py web shell work on Mac,
with some minor glitch. But different symptoms than the ones on
Windows. Have to check again on Windows.