#!/usr/bin/python # -*- coding: utf-8 -*- # # Pyromaths # Un programme en Python qui permet de créer des fiches d'exercices types de # mathématiques niveau collège ainsi que leur corrigé en LaTeX. # Copyright (C) 2006 -- Jérôme Ortais (jerome.ortais@pyromaths.org) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #---------------------------------------------------------------------- # Pyromaths : Mode graphique #---------------------------------------------------------------------- import sys import os #import wx # This module uses the new wx namespace import wx.html #import wx.lib.wxpTag import gettext import locale locale.setlocale(locale.LC_ALL, "") locale.textdomain("pyromaths") gettext.textdomain("pyromaths") _=locale.gettext #--------------------------------------------------------------------------- version = '08.11' class Verif_progs(wx.MessageDialog): def __init__(self, parent, text, entete): wx.MessageDialog.__init__(self, parent, text, entete, wx.OK | wx.ICON_ERROR) self.ShowModal() self.Destroy class MyAboutBox(wx.Dialog): text = \ _('''


Version %s

Pyromaths est un programme qui permet de creer des fiches d\u2019exercices types de mathematiques niveau college avec leur corrige.

Les fiches sont produites au format LaTeX. Pyromaths lance ensuite les commandes necessaires a la production de fichiers pdf (latex - dvips - ps2pdf) et les ouvre.

Remerciements a :

Pyromaths a ete developpe par Jerome Ortais.
Copyright (c) 2006.
Pyromaths est distribué sous licence GPL.

''') def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, _(u'a propos de Pyromaths')) html = wx.html.HtmlWindow(self, -1, size=(420, -1)) if "gtk2" in wx.PlatformInfo: html.SetStandardFonts() print os.path.basename(__file__) if os.name == "posix" and os.path.isfile("/usr/share/pixmaps/pyromaths-banniere.png"): html.SetPage(self.text % ("/usr/share/pixmaps/pyromaths-banniere.png", version)) else: pathname = os.path.dirname((sys.argv)[0]) html.SetPage(self.text % (os.path.join(os.path.abspath(pathname), 'pyromaths-banniere.png'), version)) ir = html.GetInternalRepresentation() html.SetSize((ir.GetWidth() + 25, ir.GetHeight() + 25)) self.SetClientSize(html.GetSize()) self.CentreOnParent(wx.BOTH) #--------------------------------------------------------------------------- if __name__ == '__main__': app = wx.PySimpleApp() dlg = MyAboutBox(None) dlg.ShowModal() dlg.Destroy() app.MainLoop()