info.py :  » Business-Application » hylaPEx » hylapex » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Business Application » hylaPEx 
hylaPEx » hylapex » info.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# hylaPEx, an hylafax client written in python
#
# www.unipex.it/hylapex/
#
# License:
#         GNU General Public License (GPL)
#         For more info see LICENSE.txt and LICENSE-GPL.txt
#
# Copyright (C) 2004-2006  Unipex s.r.l.,  All Rights Reserved.
# Via Vittorio Veneto 83/A
# 33050 Gonars (UD) - Italy
# phone 0039 0432 931511 - fax 0039 0432 931378
# www.unipex.it - michele.petrazzo@unipex.it

import wx, wx.html
import wx_util, os, sys

def create(parent, values=None, listToDisplay=None):
    return frm_licence(parent, values, listToDisplay)


class frm_licence(wx.Frame):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self, prnt, -1, title='Hylapex - Info and licence')

        self.SetBackgroundColour(wx.Colour(225, 225, 225))
        nb = wx.Notebook(self, -1)
        
        panel_html = wx.Panel(nb, -1)
        html_info = wx.html.HtmlWindow(panel_html, -1 )
        html_info.AppendToPage(self.overview)
        lbl_descr = wx.StaticText(panel_html, - 1, 'Informations and licence')
        lbl_descr.SetFont(wx.Font(16, wx.SWISS, wx.NORMAL, wx.NORMAL, False, 'Arial'))
        
        sizer_html = wx.BoxSizer(wx.VERTICAL)
        sizer_html.Add(lbl_descr, 0, wx.ALL, 10)
        sizer_html.Add(html_info, 1, wx.ALL | wx.EXPAND, 10)
        panel_html.SetSizerAndFit(sizer_html)
        
        panel_readme = wx.Panel(nb, -1)
        reame_txt = wx.TextCtrl(panel_readme, -1, style=wx.TE_MULTILINE | wx.TE_READONLY)
        reame_txt.SetFont(wx.Font(8,wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Courier'))
        readme_path = os.path.join(self.exe_path, "README.txt" )
        if os.path.exists(readme_path):
            f = open(readme_path)
            for line in f.readlines():
                reame_txt.AppendText(line)
            f.close()
            #reame_txt.SetSelection(0,0)
        else:
            reame_txt.AppendText('I cannot find README.txt.\n\nWhy ?? :)\n\nPlease contact me at michele.petrazzo@unipex.it')
        sizer_readme = wx.BoxSizer(wx.VERTICAL)
        sizer_readme.Add(reame_txt, 1, wx.EXPAND | wx.ALL, 10)
        panel_readme.SetSizerAndFit(sizer_readme)
        
        panel_copyright = wx.Panel(nb, -1)
        copyright_txt = wx.TextCtrl(panel_copyright, -1, style=wx.TE_MULTILINE | wx.TE_READONLY)
        copyright_txt.SetFont(wx.Font(8,wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Courier'))
        copyright_path = os.path.join(self.exe_path, "copyright.txt" )
        if os.path.exists(copyright_path):
            f = open(copyright_path)
            for line in f.readlines():
                copyright_txt.AppendText(line)
            f.close()
        else:
            copyright_txt.AppendText('I cannot find copyright.txt.\n\nWhy ?? :)\n\nPlease contact me at michele.petrazzo@unipex.it')
        sizer_copyright = wx.BoxSizer(wx.VERTICAL)
        sizer_copyright.Add(copyright_txt, 1, wx.EXPAND | wx.ALL, 10)
        panel_copyright.SetSizerAndFit(sizer_copyright)

        if self.listToDisplay:
            panel_displayList = wx.Panel(nb, -1)
            displayList_txt = wx.TextCtrl(panel_displayList, -1, style=wx.TE_MULTILINE | wx.TE_READONLY)
            displayList_txt.SetFont(wx.Font(8,wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Courier'))
            readme_path = os.path.join(self.exe_path, "README.txt" )
            for line in self.listToDisplay:
                displayList_txt.AppendText(line)
            
            sizer_displayList = wx.BoxSizer(wx.VERTICAL)
            sizer_displayList.Add(displayList_txt, 1, wx.EXPAND | wx.ALL, 10)
            panel_displayList.SetSizerAndFit(sizer_displayList)


        nb.AddPage(panel_readme, ' Readme - Features ')
        nb.AddPage(panel_copyright, ' Copyright ')
        nb.AddPage(panel_html, ' Thanks to - Italian ')
        if self.listToDisplay:
            nb.AddPage(panel_displayList, ' Current log list ')
        
        self.SetSize(wx.Size(750,300))
        self.Layout()
        
    def __init__(self, parent, values, listToDisplay=None):
        if values:
            paths = values
            exe_p = paths.my_path
        else:
            exe_p = os.path.split(os.path.abspath(sys.argv[0]) ) [0]
        
        self.listToDisplay = listToDisplay
        
        self.exe_path = exe_p
        self.logo_path = os.path.join(exe_p, "logo.jpg" )
        
        self.overview = """<html><body>
        <center><img src=%s width="200" height="110" align="top">
        <h3><center>
    
        hylapex - <a href="http://www.hylafax.org/">hylafax</a>'s client </h3>
        <h3><b>hylapex is a software developed by Unipex srl<br><br>www.unipex.it </b><br><br></h3>
    
        Thanks to:
        <ul>
        <li> python - <a href="http://www.python.org/" >www.python.org </a> - My preferred language, of course :) </li>
        <li> wxPython - <a href="http://www.wxpython.org/" >www.wxpython.org </a> - Graphical library</li>
        <li> FreeImage - <a href="http://freeimage.sf.net/" > freeimage.sf.net </a> - Very powerfull image library</li>
        <li> ctypes - <a href="http://www.wxpython.org/" >http://starship.python.net/crew/theller/ctypes/ </a> - Library for wrap .dll and .so <br>
            in python. I use it for call FreeImage and odbc system libraries </li>
        <li> pysqlite - <a href="http://pyslite.sf.net/" >pyslite.sf.net</a> - Internal phonebook</li>
        <li> mysql-python - <a href="http://mysql-python.sf.net/" >mysql-python.sf.net</a> - External phonebook</li>
        <li> boaConstructor - <a href="http://boa-constructor.sf.net/" >boa-constructor.sf.net</a> - My preferred RAD</li>
        <li> twisted - <a href="http://www.twistedmatrix.com/" >www.twistedmatrix.com</a> - Event-driven networking framework </li>
        <li> GhostScript - <a href="http://www.cs.wisc.edu/~ghost/" >http://www.cs.wisc.edu/~ghost/</a> - Library / program for<br>
            work with postscript files and convert it to tiff</li> 
        <li> GnuWin32 - <a href="http://gnuwin32.sf.net/" >http://gnuwin32.sf.net/</a> - Program for convert tiff files to pdf</li> 
        </ul>
    
        <h3><br><br><br><br>
        Now let me speak in Italian!<br><br>
        hylapex - client fax di <a href="http://www.hylafax.org/">hylafax</a></h3>
        <h3><b>hylapex e' un software sviluppato da Unipex srl<br><br>www.unipex.it </b><br><br></h3>
        Questo software e' rilasciato secondo la licenza pubblica Open Source GPL.<br>
        Il testo integrale in lingua originale lo puoi trovare <a href="http://www.gnu.org/licenses/gpl.txt"> qui </a> (http://www.gnu.org/licenses/gpl.txt).<br>
        La traduzione in italiano e' di disponibile <a href="http://www.softwarelibero.it/gnudoc/gpl.it.txt"> qui</a> (http://www.softwarelibero.it/gnudoc/gpl.it.txt). 
        </center>
        </body>
        </html>
        """ % (self.logo_path)    
        
        self._init_ctrls(parent)
            
class MyApp(wx.App):
    def OnInit(self):
        wx.InitAllImageHandlers()
        self.main = create(None)
        self.main.Show()
        return True

if __name__ == '__main__':
    app = MyApp(0)
    app.MainLoop()
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.