Complete.Org: Mailing Lists: Archives: gopher: August 2003:
[gopher] pygopherd & VIEWS (was: pygopherd & ASK)
Home

[gopher] pygopherd & VIEWS (was: pygopherd & ASK)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: gopher@xxxxxxxxxxxx
Subject: [gopher] pygopherd & VIEWS (was: pygopherd & ASK)
From: Alexey Vyskubov <alexey@xxxxxxxxxxx>
Date: Thu, 28 Aug 2003 23:05:12 +0300
Reply-to: gopher@xxxxxxxxxxxx

> > 2. Why if I set up VIEWS in pyg module for an entry I see this view
> > duplicated in gopher client?
> 
> Can you post your PYG code for me to take a look at?  Can I assume you are
> using UMN gopher as the client?  (All the other protocols will ignore +VIEWS
> since they do not support them.)

from pygopherd.handlers.pyg import PYGBase
from pygopherd.gopherentry import GopherEntry

class PYGMain(PYGBase):
        def canhandlerequest(self):
                return 1
        def getentry(self):
                entry = GopherEntry(self.selector, self.config)
                entry.type = '0'
                entry.mimetype = 'text/plain'
                entry.name = 'Test'
                entry.setea('VIEWS', 'text/plain')
                entry.setgopherpsupport(1)
                return entry
        def write(self, wfile):
                wfile.write('Test')


I see two identical views in UMN gopher client. But well, I just checked
information about this item in forg: there is only one element in VIEWS.

By the way, how can I specify few views? I tried like setea('VIEWS',
'view1\nview2') but didn't see them in UMN gopher client -- only the
first one.

-- 
Alexey Vyskubov
(at home)
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!


[Prev in Thread] Current Thread [Next in Thread]