[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



> > 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!


Reply to: