mathmaker
0.4(alpha)
|
00001 # -*- coding: utf-8 -*- 00002 00003 # Mathmaker creates automatically maths exercises sheets 00004 # with their answers 00005 # Copyright 2006-2014 Nicolas Hainaux <nico_h@users.sourceforge.net> 00006 00007 # This file is part of Mathmaker. 00008 00009 # Mathmaker is free software; you can redistribute it and/or modify 00010 # it under the terms of the GNU General Public License as published by 00011 # the Free Software Foundation; either version 3 of the License, or 00012 # any later version. 00013 00014 # Mathmaker is distributed in the hope that it will be useful, 00015 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 # GNU General Public License for more details. 00018 00019 # You should have received a copy of the GNU General Public License 00020 # along with Mathmaker; if not, write to the Free Software 00021 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00022 00023 import cfg 00024 import locale 00025 00026 LANGUAGE = cfg.get_value_from_file("LOCALES", "LANGUAGE") 00027 ENCODING = cfg.get_value_from_file("LOCALES", "ENCODING") 00028 00029 try: 00030 locale.setlocale(locale.LC_ALL, LANGUAGE + '.' + ENCODING) 00031 except: 00032 locale.setlocale(locale.LC_ALL, '') 00033 00034 #DECIMAL_POINT = str(locale.localeconv()['decimal_point']) 00035 00036 NUMBER_OF_QUESTIONS = 6 00037 00038 MONOMIAL_LETTER = 'x' 00039 MAX_MONOMIAL_COEFF = 20 00040 00041 EQUATION_NAME = 'E'