Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pyromaths
pyromaths
Commits
a67beb39
Commit
a67beb39
authored
May 31, 2013
by
Olivier Cornu
Browse files
Imports absolus dans pyromaths.classes et pyromaths.outils.
Nécessaire pour patchs suivants.
parent
1321bc71
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/pyromaths/classes/Fractions.py
View file @
a67beb39
...
...
@@ -21,7 +21,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
from
.
.outils
import
Arithmetique
from
pyromaths
.outils
import
Arithmetique
class
Fractions
:
"""Cette classe crée la notion de fractions.
...
...
src/pyromaths/classes/Polynome.py
View file @
a67beb39
...
...
@@ -8,7 +8,7 @@ if __name__=="__main__":
from
.Racine
import
simplifie_racine
,
RacineDegre2
,
sqrt
from
.Fractions
import
Fractions
import
re
from
.
.outils.Affichage
import
pTeX
,
TeX
,
radicalTeX
,
fTeX
,
Fractions
,
tTeX
from
pyromaths
.outils.Affichage
import
pTeX
,
TeX
,
radicalTeX
,
fTeX
,
Fractions
,
tTeX
class
Polynome
:
'''Classe de polynôme pour le lycee'''
...
...
src/pyromaths/classes/PolynomesCollege.py
View file @
a67beb39
...
...
@@ -25,7 +25,7 @@ import re
if
__name__
==
"__main__"
:
import
sys
sys
.
path
.
append
(
'..'
)
from
.
.outils.Affichage
import
decimaux
from
pyromaths
.outils.Affichage
import
decimaux
_POLYNOME_FORMAT
=
re
.
compile
(
r
"""
\s* # éventuellement des espaces pour commencer
...
...
@@ -448,7 +448,7 @@ class Polynome():
other
=
Polynome
(
repr
(
other
),
self
.
var
)
return
other
*
self
if
isinstance
(
other
,
str
):
from
.
.outils.Priorites3
import
splitting
from
pyromaths
.outils.Priorites3
import
splitting
ls
=
splitting
(
other
)
if
ls
.
count
(
"+"
)
or
ls
.
count
(
"-"
):
# Réduire @other avant de faire le produit et vérifier s'il faut
...
...
src/pyromaths/classes/Racine.py
View file @
a67beb39
# -*- coding: utf-8 -*-
from
.
.outils.decimaux
import
decimaux
from
.
.outils.Arithmetique
import
carrerise
,
pgcd
,
ppcm
,
factor
from
pyromaths
.outils.decimaux
import
decimaux
from
pyromaths
.outils.Arithmetique
import
carrerise
,
pgcd
,
ppcm
,
factor
from
math
import
sqrt
from
Fractions
import
Fractions
...
...
src/pyromaths/classes/SecondDegre.py
View file @
a67beb39
# -*- coding: utf-8 -*-
import
random
from
.
.outils.Arithmetique
import
factorise
,
carrerise
from
pyromaths
.outils.Arithmetique
import
factorise
,
carrerise
from
math
import
sqrt
from
..outils.Affichage
import
suppr0
,
suppr0list
from
pyromaths.outils.decimaux
import
suppr0
,
suppr0list
class
Poly2
:
"""Classe pour les polynômes du second degré."""
...
...
src/pyromaths/classes/Vecteurs.py
View file @
a67beb39
...
...
@@ -24,7 +24,7 @@
import
math
import
random
from
..classes.
Racine
import
simplifie_racine
from
Racine
import
simplifie_racine
class
Vecteur
:
...
...
src/pyromaths/outils/Affichage.py
View file @
a67beb39
...
...
@@ -23,7 +23,7 @@
import
re
from
.decimaux
import
decimaux
from
.
.classes
import
Racine
,
Fractions
from
pyromaths
.classes
import
Racine
,
Fractions
def
tex_coef
(
coef
,
var
=
''
,
bplus
=
0
,
bpn
=
0
,
bpc
=
0
):
...
...
src/pyromaths/outils/Fractions.py
View file @
a67beb39
#!/usr/bin/python
# -*- coding: utf-8 -*-
from
.
.classes.Fractions
import
Fractions
from
pyromaths
.classes.Fractions
import
Fractions
from
.
import
Arithmetique
,
Affichage
import
random
import
math
...
...
src/pyromaths/outils/Polynomes.py
View file @
a67beb39
# -*- coding: utf-8 -*-
from
.
.classes.Polynome
import
Polynome
from
pyromaths
.classes.Polynome
import
Polynome
from
.Arithmetique
import
pgcd
from
random
import
randint
,
randrange
...
...
src/pyromaths/outils/Priorites.py
View file @
a67beb39
...
...
@@ -335,7 +335,7 @@ def priorites_operations(calcul, pre = "", post = "", solution = []):
##print(priorites("-3**+2"))
##print(priorites("9+8*7"))
from
.
.classes.Fractions
import
Fractions
from
pyromaths
.classes.Fractions
import
Fractions
from
.
import
Arithmetique
,
Affichage
import
random
import
math
...
...
src/pyromaths/outils/Priorites3.py
View file @
a67beb39
...
...
@@ -23,8 +23,8 @@
#----------------------------------------------------------------------
# Pyromaths : GESTION DES PRIORITES
#----------------------------------------------------------------------
from
.
.classes.PolynomesCollege
import
Polynome
from
..outils.
Affichage
import
decimaux
from
pyromaths
.classes.PolynomesCollege
import
Polynome
from
Affichage
import
decimaux
def
cherche_polynome
(
calcul
,
index
):
...
...
src/pyromaths/outils/System.py
View file @
a67beb39
...
...
@@ -26,7 +26,7 @@ from lxml import etree
from
lxml
import
_elementpath
as
DONTUSE
# Astuce pour inclure lxml dans Py2exe
from
re
import
findall
from
.TexFiles
import
mise_en_forme
from
.
.Values
import
HOME
,
VERSION
,
CONFIGDIR
,
PACKAGES
from
pyromaths
.Values
import
HOME
,
VERSION
,
CONFIGDIR
,
PACKAGES
#==============================================================
...
...
src/pyromaths/outils/TeXMiseEnForme.py
View file @
a67beb39
...
...
@@ -25,7 +25,7 @@ import string
import
math
import
os
from
.Conversions
import
radians
,
degres
from
.
.classes.Fractions
import
Fractions
from
pyromaths
.classes.Fractions
import
Fractions
class
TeXMiseEnForme
:
...
...
src/pyromaths/outils/TestEnv.py
View file @
a67beb39
...
...
@@ -33,7 +33,7 @@
from
os.path
import
isfile
,
join
def
test
(
gui
):
from
.
.Values
import
CONFIGDIR
from
pyromaths
.Values
import
CONFIGDIR
if
not
isfile
(
join
(
CONFIGDIR
,
"pyromaths.xml"
)):
gui
.
erreur_critique
(
u
"Impossible de lire le fichier de configuration."
\
u
"Veuillez vérifier ce dernier ou faire remonter l'erreur "
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment