Eric Radman wrote:
> At is stands right now the Webware WSGI application is missing the
> serverSidePath() function, which is used many times in WebKit, and in
> one of my sites. When I search for the function definition this is
> what I get:
> 
> # grep "def serverSidePath" *
> AppServer.py:   def serverSidePath(self, path=None):
> Application.py: def serverSidePath(self, path=None):
> Application.py: def serverSidePathForRequest(self, request, debug=0):
> HTTPRequest.py: def serverSidePath(self, path=None):
> PlugIn.py:      def serverSidePath(self, path=None):
> Servlet.py:     def serverSidePath(self, path=None):
> 
> 1. Why is this function redefined so many times?

They don't all do the same thing.  Servlet.serverSidePath() returns the path
of the servlet file, but Application.serverSidePath() returns the working
dir that the appserver was launched from, and so forth.

> 2. Why do we need this function when os.path.abspath() can be used
> anywhere to get the full path for file operations?

os.path.abspath() doesn't help.  Try printing it from a servlet.  It just
gives you the working directory the appserver was launched from.

- Geoff


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to