On 04/25/12 20:36, Phil Charlesworth wrote:
I have looked at Seva's code and it doesn't produce any errors on my system. However, it doesn't access the images at all! If I add some additional tree items to force it to use images, it works fine even if I move the images out of the public directory. I attach my version of his index.py. and it's located in the examples/seva/ sub-directory of my web root.

I am using an apache server (Xampp for Windows). Is the problem something to do with the way he is serving using server.py. He is not by any chance serving index.py, I suppose? Would that cause the observed problem?
P


I think I know why this is working for you:
You are using apache, configured in such a way, so it gives access to the whole file system, and by absolute path.

If you will try to use server.py, which I provided in the example, you will see the problem: you need to make entire file system paths under server catalog:
-------
$ ./server.py
localhost - - [25/Apr/2012 11:10:26] "GET /public/index.html HTTP/1.1" 200 -
localhost - - [25/Apr/2012 11:10:26] code 404, message File not found
localhost - - [25/Apr/2012 11:10:26] "GET /home/seva/pyjamas/library/pyjamas/ui/public/tree_white.gif HTTP/1.1" 404 -
localhost - - [25/Apr/2012 11:10:26] code 404, message File not found
localhost - - [25/Apr/2012 11:10:26] "GET /home/seva/pyjamas/library/pyjamas/ui/public/tree_closed.gif HTTP/1.1" 404 -
------
As you see, I have to make paths like home/seva/pyjamas/library/pyjamas... under server's catalog for this to work. (I have pyjamas installed in my /home catalog).

So, as I understand, we have currently two options for pyjd:
1. configure web server so it serves all file system, under absolute paths.
2. recreate full file system paths under public/ catalog.

In both cases we have different environment in pyjd and pyjs:
In first case, it is bad to make all file system available for production code.
I second case, your public/ catalog must look different for pyjd and pyjs.

I do not like either of the options :)

Seva

 *
 * English
 * Russian

 * English
 * Russian

<javascript:void(0);>

Reply via email to