PEATDB/Extfile.py
def displayExtFiles(self, DB):
        """Display blobs in DB as web page links"""
        files = DB.getExtFilenames()
        print files
        if len(files) == 0:
            return
        items=[]
        for f in files:
            print f, files[f]
            items.append('<a href=%s>%s</a>' %(files[f],f)
                         )
        import markup
        page = markup.page( )
        page.init( title="PEATDB Files Preview",
                   css=( 'one.css' ),
                   header="Preview for project",
                   footer="PEATDB" )
        page.ul( class_='mylist' )
        page.li( items, class_='myitem' )
        page.ul.close()

        filename = '/tmp/prevtemp.html'
        hf = open(filename,'w')
        for c in page.content:
            hf.write(c)
        hf.close()
        import webbrowser
        webbrowser.open(filename, autoraise=1)
        return
Display blobs in DB as web page links
Display blobs in DB as web page links
Display blobs in DB as web page links
def displayExtFiles(self, DB):
        files = DB.getExtFilenames()
        print files
        if len(files) == 0:
            return
        items=[]
        for f in files:
            print f, files[f]
            items.append('<a href=%s>%s</a>' %(files[f],f)
                         )
        import markup
        page = markup.page( )
        page.init( title="PEATDB Files Preview",
                   css=( 'one.css' ),
                   header="Preview for project",
                   footer="PEATDB" )
        page.ul( class_='mylist' )
        page.li( items, class_='myitem' )
        page.ul.close()
        filename = '/tmp/prevtemp.html'
        hf = open(filename,'w')
        for c in page.content:
            hf.write(c)
        hf.close()
        import webbrowser
        webbrowser.open(filename, autoraise=1)
        return
def displayExtFiles ( self , DB ) : files = DB . getExtFilenames ( ) print files if len ( files ) == 0 : return items = [ ] for f in files : print f , files [ f ] items . append ( '<a href=%s>%s</a>' % ( files [ f ] , f ) ) import markup page = markup . page ( ) page . init ( title = "PEATDB Files Preview" , css = ( 'one.css' ) , header = "Preview for project" , footer = "PEATDB" ) page . ul ( class_ = 'mylist' ) page . li ( items , class_ = 'myitem' ) page . ul . close ( ) filename = '/tmp/prevtemp.html' hf = open ( filename , 'w' ) for c in page . content : hf . write ( c ) hf . close ( ) import webbrowser webbrowser . open ( filename , autoraise = 1 ) return
Display blobs in DB as web page links
Display blobs in DB as web page links
"""Display blobs in DB as web page links"""
self
DB