Code:
-----------------------------------------------------------------
from WebKit.Page import Page
class pathtest(Page):
def __init__(self):
Page.__init__(self)
self.testvar = self.request().serverSidePath()
def writeContent(self):
#self.write(self.testvar)
pass
---------------------------------------------------------------------
error:
-------------------------------------------------------------------
C:\Program Files\Apache Group\Apache2\htdocs\py\jose\pathtest.py
Traceback (most recent call last): File "WebKit\Application.py", line 388, in dispatchRequest self.handleGoodURL(transaction) File "WebKit\Application.py", line 534, in handleGoodURL self.createServletInTransaction(transaction) File "WebKit\Application.py", line 989, in createServletInTransaction inst = self.getServlet(transaction,path,cache) File "WebKit\Application.py", line 916, in getServlet inst = factory.servletForTransaction(transaction) File "WebKit\ServletFactory.py", line 190, in servletForTransaction return theClass() File "C:\Program Files\Apache Group\Apache2\htdocs\py\jose\pathtest.py", line 7, in __init__ File "WebKit\Page.py", line 86, in request return self._request AttributeError: pathtest instance has no attribute '_request' |
-------------------------------------------------------------------
Again Thanks for any and all help
Jose
-------- Original Message --------
Subject: Re: [Webware-discuss] ConfigParser Question
From: Aaron Held <[EMAIL PROTECTED]>
Date: Fri, November 8, 2002 7:38 am
To: jose <[EMAIL PROTECTED]>
Sorry about the last - I did not read your message completely.
In INIT you cannot use self.request() untill the __init__ for the base
class has been called. Are you calling self.request() BEFORE you
call SitePage.__init__ ??
-Aaron
jose wrote:
> Hi
>
> Is there any was to use ConfigParser with Webkit? What I want to do
> is load a config file, but I was thinking of doing it in an __init__
> statement so I could set some global variables. The only problem is
> that I can't seem to find a way to get the real path of my config
> file in the __init__ method,
> self.request().serverSidePath('config.ini') does not work. I get an
> error saying that _request is not available. Any thoughts how I
> could do this. I am currenlty importing a pythong file and using a
> class for the config file, but I wanted something a little more easy
> for other people to edit without having to know Python.
>
> Thanks in advance for any help
>
> Jose
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
