Open GoogleCodeExporter opened 9 years ago
Nicolas,
I'm not sure I'm following you. I'm not sure what test_auto.pyb is. and what
is pyb file? Do you still get these errors?
Billy
Original comment by billy.earney@gmail.com
on 17 Mar 2013 at 8:02
Hi Billy,
test_auto.pyb is a Brython script. It is has a .pyb extension because the
server I use is Karrigell. With a .py extension, Karrigell interprets the
script itself instead of returning the script content to the browser.
For the same reason, I have slightly modified Brython to use .pyb extension for
import functionnality. The extension to use is an option passed to brython()
function.
This can be helpfull with all web servers interpreting python scripts.
So, in my case, in test_auto.pyb, I import test_builtin(.pyb). As test_auto.pyb
is at root, the request should be :
GET http://localhost/test_builtin.pyb?foo=tw4h2r5g
But, it is :
GET http://localhost/test_auto.pyb/test_builtin.pyb?foo=tw4h2r5g
Nicolas
Original comment by d...@famillepinault.fr
on 17 Mar 2013 at 8:17
With revision 725 I get :
[21:37:15,700] GET http://localhost/index.html [HTTP/1.0 200 OK 16ms]
[21:37:15,809] GET http://localhost/brython/brython.js [HTTP/1.0 200 OK 16ms]
[21:37:15,810] GET http://localhost/test_auto.pyb [HTTP/1.0 200 OK 16ms]
[21:37:15,890] GET http://localhost/brython/libs/datetime.js?foo=ya44n4o7
[HTTP/1.0 200 OK 0ms]
[21:37:15,891] GET http://localhost/brython/libs/html.js?foo=w5vmc2cz [HTTP/1.0
200 OK 0ms]
[21:37:15,959] GET http://localhost/brython/libs/test_builtin.js?foo=8yy2vdqn
[HTTP/1.0 404 File not found 0ms]
[21:37:15,959] GET http://localhost/test_auto.pyb/test_builtin.js?foo=mrh8arb8
[HTTP/1.0 404 File not found 15ms]
[21:37:16,033] GET http://localhost/test_auto.pyb/test_builtin.pyb?foo=fmlficvk
[HTTP/1.0 404 File not found 0ms]
[21:37:16,034] GET
http://localhost/test_auto.pyb/test_builtin/test_builtin.js?foo=44j3qnff
[HTTP/1.0 404 File not found 15ms]
[21:37:16,095] GET
http://localhost/test_auto.pyb/test_builtin/test_builtin.pyb?foo=qo0po99y
[HTTP/1.0 404 File not found 0ms]
[21:37:16,065] Error: No module named 'test_builtin'
module '__main__' line 7
import test_builtin @ http://localhost/brython/brython.js:985
So, the problem is still there.
Please, note that I run this test with the simple server.py delivered with
Brython (Karrigell not involved here).
Nicolas
Original comment by d...@famillepinault.fr
on 17 Mar 2013 at 8:42
Original issue reported on code.google.com by
d...@famillepinault.fr
on 7 Mar 2013 at 8:31