Commit d49da4fb0356edf490c4938612afb296d51e25a1

Authored by Babacar Thiam
0 parents
Exists in master

update interface de manipulation bd

Showing 96 changed files with 21110 additions and 0 deletions   Show diff stats
README.md 0 → 100644
  1 +++ a/README.md
... ... @@ -0,0 +1,10 @@
  1 +chargementSGDEexcel btl Version installation guide
  2 +
  3 +
  4 +1- ChargementSGDEexcel with btl file
  5 +
  6 +To use it you want to go to chargeravecbtl folder et read the readme file.
  7 +
  8 +2- ChargementSGDEexcel without btl file
  9 +
  10 +To use it you want to go to chargersansbtl folder et read the readme file.
... ...
chargeravecbtl/README 0 → 100644
  1 +++ a/chargeravecbtl/README
... ... @@ -0,0 +1,47 @@
  1 +chargementSGDEexcelsans btl Version 1.2 installation guide
  2 +
  3 +
  4 +1- Installation on Linux/Unix
  5 +
  6 +To install the ChargementSGDEexcelavecbtl package, you must install
  7 +the Python Programming Language environnement on your system.
  8 +The Python software is available for download at http://www.python.org.
  9 +
  10 +Once python is installed on your system, simply download the
  11 +ChargementSGDEexcelavecbtl package from the gitlasso
  12 +The package for Linux/Unix comes
  13 +as a gzip tar file. To install, follow these steps:
  14 +
  15 +1- tar zxvf ChargementSGDEexcelavecbtl-1.2.tar.gz
  16 +(or gunzip -c ChargementSGDEexcelavecbtl-1.2.tar.gz | tar xvf -)
  17 +2- cd ChargementSGDEexcelavecbtl-1.2/src
  18 +3- su - root (become superuser)
  19 +4- python setup.py install
  20 +
  21 +And ChargementSGDEexcelavecbtl should now be
  22 +available for execution.
  23 +
  24 +
  25 +2- Installation of the source code on Windows
  26 +
  27 +To install the ChargementSGDEexcelavecbtl package, you must install
  28 +the Python Programming Language environnement on your system.
  29 +The Python software is available for download at http://www.python.org.
  30 +
  31 +Once python is installed on your system, simply download the
  32 +ChargementSGDEexcelavecbtl package from the gitlasso
  33 +The package for windows comes Windows comes as a zip file.
  34 + To install, follow these steps:
  35 +
  36 +1- Download the zip file to a directory such as c:\temp
  37 +2- Unzip ChargementSGDEexcelavecbtl-1.2.zip
  38 +3- Open a command window
  39 +4- cd c:\temp\ChargementSGDEexcelavecbtl-1.2\src
  40 +5- python setup.py install
  41 +
  42 +
  43 +ChargementSGDEexcelavecbtl.py should now be
  44 +available for execution and will have been copied to the Scripts directory of your Python
  45 +installation (e.g., c:\Python24\Scripts). In order to use
  46 +the ChargementSGDEexcelavecbtl.py package from anywhere on your machine, you must
  47 +add this directory to your PATH environnement variable.
... ...
chargeravecbtl/src/MANIFEST.in 0 → 100644
  1 +++ a/chargeravecbtl/src/MANIFEST.in
... ... @@ -0,0 +1,2 @@
  1 +include README.md
  2 +include requirements.txt
... ...
chargeravecbtl/src/Makefile 0 → 100644
  1 +++ a/chargeravecbtl/src/Makefile
... ... @@ -0,0 +1,7 @@
  1 +#
  2 +#Makefile pour construire les paquets de
  3 +#distribution de odf2netcdf
  4 +
  5 +all:
  6 + python setup.py sdist --formats=gztar,zip
  7 + python setup.py bdist_wininst
... ...
chargeravecbtl/src/README.md 0 → 100644
  1 +++ a/chargeravecbtl/src/README.md
... ... @@ -0,0 +1,47 @@
  1 +chargementSGDEexcelsans btl Version 1.2 installation guide
  2 +
  3 +
  4 +1- Installation on Linux/Unix
  5 +
  6 +To install the ChargementSGDEexcelavecbtl package, you must install
  7 +the Python Programming Language environnement on your system.
  8 +The Python software is available for download at http://www.python.org.
  9 +
  10 +Once python is installed on your system, simply download the
  11 +ChargementSGDEexcelavecbtl package from the gitlasso
  12 +The package for Linux/Unix comes
  13 +as a gzip tar file. To install, follow these steps:
  14 +
  15 +1- tar zxvf ChargementSGDEexcelavecbtl-1.2.tar.gz
  16 +(or gunzip -c ChargementSGDEexcelavecbtl-1.2.tar.gz | tar xvf -)
  17 +2- cd ChargementSGDEexcelavecbtl-1.2/src
  18 +3- su - root (become superuser)
  19 +4- python setup.py install
  20 +
  21 +And ChargementSGDEexcelavecbtl should now be
  22 +available for execution.
  23 +
  24 +
  25 +2- Installation of the source code on Windows
  26 +
  27 +To install the ChargementSGDEexcelavecbtl package, you must install
  28 +the Python Programming Language environnement on your system.
  29 +The Python software is available for download at http://www.python.org.
  30 +
  31 +Once python is installed on your system, simply download the
  32 +ChargementSGDEexcelavecbtl package from the gitlasso
  33 +The package for windows comes Windows comes as a zip file.
  34 + To install, follow these steps:
  35 +
  36 +1- Download the zip file to a directory such as c:\temp
  37 +2- Unzip ChargementSGDEexcelavecbtl-1.2.zip
  38 +3- Open a command window
  39 +4- cd c:\temp\ChargementSGDEexcelavecbtl-1.2\src
  40 +5- python setup.py install
  41 +
  42 +
  43 +ChargementSGDEexcelavecbtl.py should now be
  44 +available for execution and will have been copied to the Scripts directory of your Python
  45 +installation (e.g., c:\Python24\Scripts). In order to use
  46 +the ChargementSGDEexcelavecbtl.py package from anywhere on your machine, you must
  47 +add this directory to your PATH environnement variable.
... ...
chargeravecbtl/src/__pycache__/chargementSGDEexcelavecbtl.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/classe_variable.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/databtlType.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/jeudedonneesdelete.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/loadjd.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/recupdatanetcdf.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/seconnecter.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/testPostgres.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/testbtl.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/testexcel.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/__pycache__/usage.cpython-36.pyc 0 → 100644
No preview for this file type
chargeravecbtl/src/chargementSGDEexcelavecbtl.py 0 → 100644
  1 +++ a/chargeravecbtl/src/chargementSGDEexcelavecbtl.py
... ... @@ -0,0 +1,183 @@
  1 +#! python
  2 +# -*- coding: UTF-8 -*-
  3 +#####################################
  4 +#
  5 +#Conversion de fichiers ODF a csv
  6 +#
  7 +#Auteur: James Caveen
  8 +# Ecrit a partir du programme fortran
  9 +# odf2txt de C. Lafleur (IML)
  10 +#
  11 +#$Id$
  12 +#
  13 +####################################
  14 +from googletrans import Translator
  15 +import testPostgres as pf
  16 +import traceback
  17 +import sys
  18 +from tkinter import *
  19 +from tkinter import ttk, messagebox
  20 +from tkinter import *
  21 +from tkinter.filedialog import *
  22 +import pandas as pd
  23 +import recupdatanetcdf as rdn
  24 +import testexcel as te
  25 +import loadjd as ld
  26 +import jeudedonneesdelete as jddd
  27 +def geoliste(g):
  28 + r=[i for i in range(0,len(g)) if not g[i].isdigit()]
  29 + return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
  30 +def centrefenetre(fen):
  31 + fen.update_idletasks()
  32 + l,h,x,y=geoliste(fen.geometry())
  33 + fen.geometry("%dx%d%+d%+d" % (l,h,(fen.winfo_screenwidth()-l)//2,(fen.winfo_screenheight()-h)//2))
  34 +
  35 +#bd.cursor.execute("select nextval('seq_int')")
  36 +#resultat2=bd.cursor.fetchone()
  37 +#print(resultat2)
  38 +class InterfaceGraphic(Tk):
  39 +
  40 + def __init__(self):
  41 + Tk.__init__(self)
  42 + #self.minsize(1200,700)
  43 + self.title('Gestion des interfaces')
  44 + self.creerWidgets()
  45 +##interface pour la mission
  46 + def creerWidgets(self):
  47 + self.mainWindow = Frame(self, bg="blue")
  48 + self.mainWindow.pack(fill=BOTH, expand=1)
  49 + self.tete = Frame(self.mainWindow, bg="blue")
  50 + self.tete.pack(side=TOP, fill=BOTH)
  51 + self.label = Label(self.tete,font=('arial',70,'bold'),text="Création netcdf et chargement", bg="blue", fg="white")
  52 + self.label.pack(padx=5, pady=5)
  53 +
  54 + self.frameSaisie = Frame(self.mainWindow, bg="blue")
  55 + self.frameSaisie.pack(fill=BOTH)
  56 + self.frameSaisie1 = Frame(self.mainWindow, bg="blue")
  57 + self.frameSaisie1.pack(fill=BOTH)
  58 + self.frameResult = Frame(self.frameSaisie, bd=4, relief=SUNKEN)
  59 + self.frameResult.pack(side=LEFT,fill=X)
  60 + #self.frameButtoninter = Frame(self.frameSaisie, bg="blue")
  61 + #self.frameButtoninter.pack(side=LEFT)
  62 + #self.btninter = Button(self.frameButtoninter, text="Nouveau", bg="blue", fg="white")
  63 + #self.btninter.pack(padx=5, pady=5)
  64 + self.frameButtonmission = Frame(self.frameSaisie1, bg="blue")
  65 + self.frameButtonmission.pack(side=LEFT)
  66 + self.btnmission = Button(self.frameButtonmission,font=('arial',50,'bold'),bd=4, text="charger all", bg="blue", fg="white", command=self.gestionIntervenant)
  67 + self.btnmission.grid(row=0,column=0)
  68 + self.frameButtontable = Frame(self.frameSaisie, bg="blue")
  69 + self.frameButtontable.pack(side=LEFT)
  70 + self.btntable = Button(self.frameButtontable,font=('arial',50,'bold'),bd=4, text="excel avec bt et cast", bg="blue", fg="white",command=self.excelavecbtcast)
  71 + self.btntable.grid(row=0,column=1)
  72 + self.frameButtonsauve = Frame(self.frameSaisie, bg="blue")
  73 + self.frameButtonsauve.pack(side=LEFT)
  74 + self.btnsauve = Button(self.frameButtonsauve,font=('arial',50,'bold'),bd=4, text="fichier de chargement", bg="blue", fg="white", command=self.filecharger)
  75 + self.btnsauve.grid(row=0,column=2)
  76 + self.frameButtonprojet = Frame(self.frameSaisie, bg="blue")
  77 + self.frameButtonprojet.pack(side=LEFT)
  78 + self.btnsauve1 = Button(self.frameButtonprojet,font=('arial',50,'bold'),bd=4, text="chargement de donnees", bg="blue", fg="white", command=self.chargerdata)
  79 + self.btnsauve1.grid(row=0,column=3)
  80 +
  81 +
  82 +
  83 + self.frameButtonprojet1 = Frame(self.frameSaisie1, bg="blue")
  84 + self.frameButtonprojet1.pack(side=LEFT)
  85 + self.btnsauve11 = Button(self.frameButtonprojet1,font=('arial',50,'bold'),bd=4, text="test de suppression", bg="blue", fg="white", command=self.deletedata)
  86 + self.btnsauve11.grid(row=0,column=4)
  87 +
  88 + self.frameButtonprojet2 = Frame(self.frameSaisie1, bg="blue")
  89 + self.frameButtonprojet2.pack(side=LEFT)
  90 + self.btnsauve1 = Button(self.frameButtonprojet2,text="Rep des fichiers",font=('arial',50,'bold'),command=self.recupJD_Rep)
  91 + self.btnsauve1.grid(row=0,column=5)
  92 + self.modified51=StringVar()
  93 + #self.frameButtontypes = Frame(self.frameSaisie1, bg="blue")
  94 + #self.frameButtontypes.pack(side=LEFT)
  95 + #self.btnsauve11111 = Button(self.frameButtontypes,font=('arial',50,'bold'),bd=4, text="delete jd", bg="blue", fg="white", command=self.gestiondeletejd)
  96 + #self.btnsauve11111.grid(row=2,column=4)
  97 +
  98 + self.exit_button = Button(self.mainWindow,font=('arial',50,'bold'),bd=4,fg="black",bg="red", text = "Exit", command = self.mainWindow.quit)
  99 + self.exit_button.pack()
  100 + def recupJD_Rep(self):
  101 + rep = askdirectory(title='Choisissez un repertoire')
  102 + self.modified51.set(rep)
  103 + return rep
  104 + def gestionIntervenant(self):
  105 + #prob = self.loginEntry.get().strip().split(' ')
  106 + try:
  107 + #self.inter = gI.IntervenantGraphic()
  108 + #self.inter.mainloop()
  109 + self.destroy()
  110 + self.inter = gI.IntervenantGraphic()
  111 + #self.inter.mainloop()
  112 + except Exception as err:
  113 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  114 + % (err))
  115 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  116 + def excelavecbtcast(self):
  117 + #prob = self.loginEntry.get().strip().split(' ')
  118 + try:
  119 + if(self.modified51.get()==""):
  120 + messagebox.showerror("Erreur", "choisir le dossier des donnees d'abord en cliquant sur dans rep des fichiers.")
  121 + else:
  122 + #self.destroy()
  123 + self.mission=te.creerAllbtl(self.modified51.get())
  124 + except Exception as err:
  125 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  126 + % (err))
  127 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  128 + def filecharger(self):
  129 + #prob = self.loginEntry.get().strip().split(' ')
  130 + try:
  131 + if(self.modified51.get()==""):
  132 + messagebox.showerror("Erreur", "choisir le dossier des donnees d'abord en cliquant sur dans rep des fichiers.")
  133 + else:
  134 + self.destroy()
  135 + self.mission = rdn.recupInterface(self.modified51.get())
  136 + except Exception as err:
  137 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  138 + % (err))
  139 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  140 + def chargerdata(self):
  141 + #prob = self.loginEntry.get().strip().split(' ')
  142 + try:
  143 + if(self.modified51.get()==""):
  144 + messagebox.showerror("Erreur", "choisir le dossier des donnees d'abord en cliquant sur dans rep des fichiers.")
  145 + else:
  146 + #self.destroy()
  147 + self.mission = ld.chargementbtl(self.modified51.get())
  148 + messagebox.showinfo("chargement", "chargement dans la base fait avec succes.")
  149 + except Exception as err:
  150 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  151 + % (err))
  152 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  153 + def deletedata(self):
  154 + #prob = self.loginEntry.get().strip().split(' ')
  155 + try:
  156 + if(self.modified51.get()==""):
  157 + messagebox.showerror("Erreur", "choisir le dossier des donnees d'abord en cliquant sur dans rep des fichiers.")
  158 + else:
  159 + self.destroy()
  160 + self.mission = jddd.recupdelete(self.modified51.get())
  161 +
  162 + except Exception as err:
  163 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  164 + % (err))
  165 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  166 + def chargerAll(self):
  167 + #prob = self.loginEntry.get().strip().split(' ')
  168 + try:
  169 + if(self.modified51.get()==""):
  170 + messagebox.showerror("Erreur", "choisir le dossier des donnees d'abord en cliquant sur dans rep des fichiers.")
  171 + else:
  172 + self.destroy()
  173 + self.mission=te.creerAllbtl(self.modified51.get())
  174 + self.mission = rdn.recupInterface(self.modified51.get())
  175 + self.mission = ld.chargementbtl(self.modified51.get())
  176 + except Exception as err:
  177 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  178 + % (err))
  179 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  180 +if __name__ == '__main__':
  181 + huff = InterfaceGraphic()
  182 + centrefenetre(huff)
  183 + huff.mainloop()
... ...
chargeravecbtl/src/classe_variable.py 0 → 100644
  1 +++ a/chargeravecbtl/src/classe_variable.py
... ... @@ -0,0 +1,85 @@
  1 +#########################################################
  2 +# Classe variable pour les fichiers ODF
  3 +#
  4 +# Pour chaque variable du fichier, on enmagasine
  5 +# le nom, le code, les unites, le Print_field_width, le print_decimal_places
  6 +# et on attribue un numero a la variable.
  7 +# Ce numero permet de trouver l'objet variable contenant
  8 +# les parametres de controle de qualite d'une variable donnee:
  9 +# Par exemple, si la variable temperature a le numero 1, ses QQQQ ont
  10 +# le numero 2
  11 +#
  12 +#James Caveen : juillet 2006
  13 +#
  14 +#Parametres d'instanciation:
  15 +# num_var: numero sequentiel de la variable
  16 +# nom: Nom complet (e.g., 'Sensor Depth Below...)
  17 +# code: Nom court (e.g., DEPH_01)
  18 +# unites: unites de la variable
  19 +# p_f_w: Print field width (utilise par getvaleur)
  20 +# p_d_p: Print decimal places (utilise par getvaleur)
  21 +#
  22 +#$Id$
  23 +#
  24 +################################################################
  25 +
  26 +
  27 +
  28 +class variable:
  29 + def __init__(self,name,units,types,code,gf3,btl2gf3,decimal,desc):
  30 + self.name = name
  31 + self.units = units
  32 + self.type=types
  33 + self.code = code
  34 + self.gf3 = gf3
  35 + self.btl2gf3 = btl2gf3
  36 + self.decimal = decimal
  37 + self.desc = desc
  38 + self.valeurs=[]
  39 + def __str__(self):
  40 + return "nom:%s Unites: %s type: %s Code: %s gf3: %s btl2gf3: %s decimal: %s desc: %s" % \
  41 + (self.name,self.units,self.type,self.code,self.gf3,self.btl2gf3,self.decimal,self.desc)
  42 +
  43 +
  44 + def getname(self):
  45 + '''Obtenir le numero sequentiel de la variable'''
  46 + return self.name
  47 + def getunits (self):
  48 + '''Obtenir le nom complet de la variable,
  49 + Par exemple: Sensor depth below surface'''
  50 + return self.units
  51 + def getcode (self):
  52 + '''Obtenir le nom court de la variable.
  53 + Par exemple: DEPH01'''
  54 + return self.code
  55 + def gettype (self):
  56 + '''Obtenir les unites de la variable'''
  57 + return self.type
  58 + def getgf3(self):
  59 + '''Obtenir le PFW (floating point width) de la variable'''
  60 + return self.gf3
  61 + def getbtl2gf3 (self):
  62 + '''Obtenir le PDP (Precision decimal places) de la variable'''
  63 + return self.btl2gf3
  64 +
  65 + def getdecimal(self):
  66 + '''Obtenir le nombre de valeurs associees a la variable'''
  67 + return self.decimal
  68 + def getdesc(self):
  69 + '''Obtenir le nombre de valeurs associees a la variable'''
  70 + return self.desc
  71 + def replaceallvaleurs(self, valeurs):
  72 + '''Remplacer toutes les valeurs de la variable par une
  73 + nouvelle liste de valeurs'''
  74 + self.valeurs[:] = valeurs
  75 + def createVar(self,name_dim,valeurs):
  76 + self.nom=self.getname()
  77 + self.name_dim.units=self.getunits()
  78 + self.name_dim.type=self.gettype()
  79 + self.name_dim.code=self.getcode()
  80 + self.name_dim.gf3=self.getgf3()
  81 + self.name_dim.btl2gf3=self.getbtl2gf3()
  82 + self.name_dim.decimal=self.getdecimal()
  83 + self.name_dim.desc=self.getdesc()
  84 + self.name_dim[:]=self.replaceallvaleurs(valeurs)
  85 + return self.name_dim
... ...
chargeravecbtl/src/conn.py 0 → 100644
  1 +++ a/chargeravecbtl/src/conn.py
... ... @@ -0,0 +1,125 @@
  1 +import testPostgres as pf
  2 +import traceback
  3 +import sys
  4 +from tkinter import *
  5 +from tkinter import ttk, messagebox
  6 +import pandas as pd
  7 +import json
  8 +#import excel2nc as ex
  9 +#bd.cursor.execute("select nextval('seq_int')")
  10 +#resultat2=bd.cursor.fetchone()
  11 +#print(resultat2)
  12 +def geoliste(g):
  13 + r=[i for i in range(0,len(g)) if not g[i].isdigit()]
  14 + return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
  15 +def centrefenetre(fen):
  16 + fen.update_idletasks()
  17 + l,h,x,y=geoliste(fen.geometry())
  18 + fen.geometry("%dx%d%+d%+d" % (l,h,(fen.winfo_screenwidth()-l)//2,(fen.winfo_screenheight()-h)//2))
  19 +
  20 +class ConnGraphic(Tk):
  21 +
  22 + def __init__(self):
  23 + Tk.__init__(self)
  24 + #self.minsize(1200,700)
  25 + self.title('connexion a la base de donnees')
  26 + self.creerWidgets()
  27 +
  28 +##interface pour la mission
  29 + def creerWidgets(self):
  30 + self.mainWindow = Frame(self, bg="blue")
  31 + self.mainWindow.pack(fill=BOTH, expand=1)
  32 + self.frameSaisie = Frame(self.mainWindow, bg="blue")
  33 + self.frameSaisie.pack(fill=BOTH)
  34 + self.frameResult10 = Frame(self.mainWindow)
  35 + self.frameResult10.pack(fill=BOTH)
  36 +
  37 + self.frameResult = Frame(self.frameResult10, bd=4, relief=SUNKEN)
  38 + self.frameResult.pack(side=LEFT,fill=X)
  39 + self.ent_label = Label(self.frameResult,font=('arial',50,'bold'),bd=4,bg="blue", fg="white", text="Information de connection:")
  40 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  41 + self.ent_label.pack(side=TOP,padx=5, pady=5)
  42 +
  43 + self.frameResult00 = Frame(self.frameResult, bd=4, relief=SUNKEN)
  44 + self.frameResult00.pack(fill=BOTH,padx=5, pady=5)
  45 + self.modified_label53321 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "host:")
  46 + #self.modified_label53321.configure(font=('Helvetica', 12))
  47 + #self.modified_label53321.pack(side=LEFT,padx=5, pady=5)
  48 + self.modified5332100=StringVar()
  49 + self.modified_entry53321= Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified5332100)
  50 +
  51 + self.modified_label53321.grid(row =0)
  52 + self.modified_entry53321.grid(row =0, column=1)
  53 + #self.modified_entry53321.pack(side=LEFT,padx=5, pady=5)
  54 + #self.modified_entry53321.focus()
  55 + #self.frameResult21 = Frame(self.frameResult10, bd=2, relief=SUNKEN)
  56 + #self.frameResult21.pack(side=LEFT,fill=Y)
  57 + self.modified_label51 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "db info:")
  58 + #self.modified_label51.configure(font=('Helvetica', 12))
  59 + #self.modified_label51.pack(side=LEFT,padx=25, pady=25)
  60 + self.modified_label51.grid(row =1, column =0)
  61 +
  62 + self.modified51=StringVar()
  63 + self.modified_entry51=Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified51)
  64 + self.modified_entry51.grid(row =1, column =1)
  65 + self.modified_label4 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "User:")
  66 + #self.modified_label4.configure(font=('Helvetica', 12))
  67 + #self.modified_label4.pack(side=LEFT,padx=25, pady=25)
  68 + #self.modified_label4.grid(row =0,column =4)
  69 + self.modified4=StringVar()
  70 + self.modified_entry4 = Entry(self.frameResult00,font=('arial',50,'bold'),bd=4,textvariable=self.modified4)
  71 + self.modified_entry4.grid(row =2, column =1)
  72 + self.modified_label4.grid(row =2, column =0)
  73 + #self.modified_entry4.pack(side=LEFT,padx=25, pady=25)
  74 + #self.modified_entry4.focus()
  75 + # self.modified_entry4.grid(row =1,column =4)
  76 +
  77 + #self.frameResult2112 = Frame(self.frameResult, bd=2, relief=SUNKEN)
  78 + #self.frameResult2112.pack(side=LEFT,fill=Y)
  79 + self.modified_label5 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "Password:")
  80 + #self.modified_label5.configure(font=('Helvetica', 12))
  81 + self.modified_label5.grid(row =3, column =0)
  82 +
  83 + #self.modified_label5.pack(side=LEFT,padx=25, pady=25)
  84 + self.modified5=StringVar()
  85 + self.modified_entry5= Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified5,show="*")
  86 +
  87 + self.modified_entry5.grid(row =3, column =1)
  88 +
  89 + self.btnan = Button(self.mainWindow,font=('arial',50,'bold'),bd=4, text="Se connecter", bg="blue", fg="white", command=self.seconnecter)
  90 + self.btnan.pack()
  91 + #self.btntablenew = Button(self.mainWindow, text="initialiser",font=('arial',50,'bold'),bd=4, bg="blue", fg="white",command=self.nouveauD)
  92 + #self.btntablenew.pack()
  93 +
  94 + #self.frameButtontable1 = Frame(self.frameSaisie, bg="blue")
  95 + #self.frameButtontable1.pack(side=LEFT)
  96 + #self.btnacceuille = Button(self.frameResult00, text="Acceuil",font=('arial',50,'bold'),bd=4, bg="red", fg="white",command=self.acceuil)
  97 + #self.btnacceuille.grid(row=3,column=2)
  98 +
  99 + self.exit_button = Button(self.mainWindow,font=('arial',50,'bold'),bd=4,bg="red",fg="black", text = "Exit", command = self.destroy)
  100 + self.exit_button.pack()
  101 +
  102 +
  103 + def nouveauD(self):
  104 + #self.dose.set("")
  105 + self.modified5332100.set("")
  106 + self.modified51.set("")
  107 + self.modified4.set("")
  108 + self.modified5.set("")
  109 + def seconnecter(self):
  110 + playlist = {}
  111 + playlist["identifiant"] = {}
  112 + playlist["identifiant"]["user"]=self.modified4.get()
  113 + playlist["identifiant"]["password"]=self.modified5.get()
  114 + playlist["dbinfo"] = {}
  115 + playlist["dbinfo"]["db"]=self.modified51.get()
  116 + playlist["dbinfo"]["host"]=self.modified5332100.get()
  117 + with open('conn1.json', 'w', encoding='utf-8') as f:
  118 + json.dump(playlist, f, indent=4)
  119 + self.destroy()
  120 + #ex.bd.cursor.execute("select nom from groupe order by nom")
  121 + #resultat1=ex.bd.cursor.fetchall()
  122 + #print("bonjour",resultat1)
  123 + #a=pf.recupconf("conn1.json")
  124 + #bd=pf.GestionBD(a[0],a[1],a[2],a[3])
  125 + #print(a)
... ...
chargeravecbtl/src/databtlType.py 0 → 100644
  1 +++ a/chargeravecbtl/src/databtlType.py
... ... @@ -0,0 +1,152 @@
  1 +import xlrd
  2 +from netCDF4 import Dataset
  3 +import numpy as np
  4 +import pandas as pd
  5 +import os, os.path
  6 +import glob
  7 +import testbtl as tb
  8 +from classe_variable import variable
  9 +"""creation des attributs pour les variables dans le fichier btl """
  10 +"""les codes"""
  11 +def mescodebtl():
  12 + code1=('Fichier','Latitude','Longitude','unique','Date','PrDM','PRES_SDEV','TEMP','TE90_SDEV','Sal00','Date','Time',"CNTR","nCNTR","Sigma-t00","FlECO-AFL","Ph","pH",'Upoly0','Upoly1','Sbeox0ML/L','CStarTr0','Par','TEMP_RT','SECC')
  13 + code2=('Q_TEMP','Sal','Q_PSAL','OXY_','Q_OXY',"CHL_","Q_CHL","PHA_","Q_PHA",'NOx_','Q_NOx','TEMP_','TEMP_QC')
  14 + code3=('Salinity','Oxygen',"Si","PO4",'NOx','Silicates','Si_',"Nitrates")
  15 + res=list(code1)
  16 + res.extend(list(code2))
  17 + res.extend(list(code3))
  18 + return res
  19 +def mesgf3code(code):
  20 + a={}
  21 + for j in code:
  22 + a[creerLaVariable(j).getgf3()]=j
  23 + return a
  24 +def mescodegf3(l,code):
  25 + return l[code]
  26 +"""les attributs des variables """
  27 +def creerLaVariable(code):
  28 + if code=="Fichier":
  29 + return variable('Filename','none','CTD','Fichier','(none)',1,0,'filename: CTD')
  30 + elif code=="Latitude":
  31 + return variable('latitude','degrees','CTD','Latitude','LATD',1,5,'latitude: CTD')
  32 + elif code=="Longitute":
  33 + return variable('longitude','degrees','CTD','Longitute','LOND',1,5,'longitude: CTD')
  34 + elif code=="unique":
  35 + return variable('uniquesample number', 'none','CTD','unique','IDEN',1,0,'unique sample number')
  36 + elif code=="zbouteille":
  37 + return variable('pressure depth of the water sample','db','CTD','zbouteille','PRES',1,1,'nominal or exact water sample depth')
  38 + elif code=="Date":
  39 + return variable('GMT date of the water sample', 'none','CTD','Date','UNKN',1,0,'date: CTD')
  40 + elif code=="Time":
  41 + return variable( 'GMT time of the water sample', 'none','CTD','Time','UNKN',1,0,'time: CTD')
  42 + elif code=="PrDM":
  43 + return variable('CTD pressure', 'db','CTD','PrDM','PRES',1,1,'pressure: CTD')
  44 + elif code=="TEMP":
  45 + return variable('CTD temperature ITS-90', 'deg C','CTD','TE90','TE090C',1,2,'temperature: CTD')
  46 + elif code=="TE90_SDEV":
  47 + return variable('CTD standard deviation temperature', 'deg C','CTD','TE90_SDEV','SDEV',1,3,'standard deviation temperature: CTD')
  48 + elif code=="Salinity":
  49 + return variable('bottle sample salinity PSS-78', 'PSU','labo','PSAL_BS','PSAL',1,2,'')
  50 + elif code=="Si":
  51 + d='silicate content: Strickland and Parsons (1972)'+\
  52 + '\nsilicate content: American Public Health Association (1989)'+\
  53 + '\nsilicate content: AA3; Strickland and Parsons (1972)'+\
  54 + '\nsilicate content: not corrected for salinity'+\
  55 + '\nsilicate content: unknown method.'+\
  56 + '\nsilicate content: Strickland and Parsons (1968)'+\
  57 + '\nsilicate content: Strain & Clement.1996.Can Data Rep Fish Aquat Sci 1004'
  58 + return variable('bottle sample silicate (SIO4-SI) content', 'mmol/m**3','labo','Si_','SLCA',1,2,d)
  59 + elif code=="Si_":
  60 + d='silicate content: Strickland and Parsons (1972)'+\
  61 + '\nsilicate content: American Public Health Association (1989)'+\
  62 + '\nsilicate content: AA3; Strickland and Parsons (1972)'+\
  63 + '\nsilicate content: not corrected for salinity'+\
  64 + '\nsilicate content: unknown method.'+\
  65 + '\nsilicate content: Strickland and Parsons (1968)'+\
  66 + '\nsilicate content: Strain & Clement.1996.Can Data Rep Fish Aquat Sci 1004'
  67 + return variable('bottle sample silicate (SIO4-SI) content', 'mmol/m**3','labo','Si_','SLCA',1,2,d)
  68 + elif code=="Silicates":
  69 + d='silicate content: Strickland and Parsons (1972)'+\
  70 + '\nsilicate content: American Public Health Association (1989)'+\
  71 + '\nsilicate content: AA3; Strickland and Parsons (1972)'+\
  72 + '\nsilicate content: not corrected for salinity'+\
  73 + '\nsilicate content: unknown method.'+\
  74 + '\nsilicate content: Strickland and Parsons (1968)'+\
  75 + '\nsilicate content: Strain & Clement.1996.Can Data Rep Fish Aquat Sci 1004'
  76 + return variable('bottle sample silicate (SIO4-SI) content', 'mmol/m**3','labo','Si_','SLCA',1,2,d)
  77 + elif code=="PO4":
  78 + return variable('bottle sample phosphate (PO4-P) content', 'mmol/m**3','labo','PO4_','PHOS',1,2,'')
  79 + elif code=="Sal00":
  80 + return variable('CTD salinity PSS-78', 'PSU','CTD','Sal00','PSAL_01',1,2,'salinity: CTD')
  81 + elif code=="CNTR":
  82 + return variable('scan number','none','CTD','CNTR','CNTR',1,0,'scan number: CTD')
  83 + elif code=="nCNTR":
  84 + return variable('number of scans averaged','none','CTD','nCNTR','NUM_',1,0,'number of scans averaged: CTD')
  85 + elif code=="PRES_SDEV":
  86 + return variable('CTD standard deviation pressure','db','CTD','PRES_SDEV','SDEV',1,2,'standard deviation pressure: CTD')
  87 + elif code=='Sigma-t00':
  88 + return variable('CTD sigma-t','kg/m**3','CTD','Sigma-t00','SIGT',1,2,'sigma-t: CTD')
  89 + elif code=="FlECO-AFL":
  90 + return variable('CTD fluorescence','mg/m**3','CTD','FlECO-AFL','FLOR',1,3,'fluorescence: CTD')
  91 + elif code=="Ph":
  92 + return variable('CTD Ph','SI','CTD','Ph','PHPH',1,2,'Ph: CTD')
  93 + elif code=='Upoly0':
  94 + return variable('CTD nitrate','microM','CTD','Upoly0','NTRA_01',1,2,'nitrate: CTD')
  95 + elif code=='Upoly1':
  96 + return variable('CTD nitrate','microM','CTD','Upoly1','NTRA_02',1,2,'nitrate: CTD')
  97 + elif code=='Sbeox0ML/L':
  98 + return variable('CTD oxygen','ml/l','CTD','Sbeox0ML/L','DOXY',1,3,'oxygen: CTD')
  99 + elif code=='pH':
  100 + return variable('bottle sample pH','NBS scale','labo','pH','pHT_',1,4,'pH: calculated in situ value, Strickland & Parsons 1972 (NBS scale) pH: calculated in situ value, Lewis & Wallace 1998 (NBS scale) used for CTD calibration and comparison with old datasets pH: unknown method')
  101 + elif code=='CStarTr0':
  102 + return variable('CTD transmissivity','%','CTD','CStarTr0','TRAN',1,1,'transmissivity: CTD')
  103 + elif code=='Par':
  104 + return variable('CTD irradiance (PAR)','ueinsteins/s/m**2','CTD', 'Par','PSAR',1,3,'water column PAR (photosynthetically active radiation): CTD')
  105 + elif code=='TEMP_RT':
  106 + return variable('reversing thermometer temperature ITS-90','deg C','terrain','TEMP_RT','TE90T',1,4,'reversing thermometer measurement')
  107 + elif code=='Q_TEMP':
  108 + return variable('quality flag temperature','(none)','terrain','Q_TEMP','QQQQ',1,0,'quality flag of temperature')
  109 + elif code=='SECC':
  110 + return variable('secchi depth','m','terrain','SECC','SECC',1,0,'secchi depth measurement')
  111 + elif code=='Sal':
  112 + return variable('bottle sample salinity PSS-78','PSU','labo','Sal','PSAL_02',1,2,'autoSAL salinity measurement')
  113 + elif code=='Q_PSAL':
  114 + return variable('quality flag of bottle sample salinity','(none)', 'labo','Q_PSAL','PSAL_QC',1,0,'quality flag of bottle sample salinity')
  115 + elif code=='OXY_':
  116 + return variable('bottle sample oxygen','ml/l', 'labo','OXY_','DOXY_02',1,3,'Winkler dissolved oxygen titration method: Carpenter (1965) and Carrit and Carpenter (1966)')
  117 + elif code=='Oxygen':
  118 + return variable('bottle sample oxygen','ml/l', 'labo','OXY_','DOXY_02',1,3,'Winkler dissolved oxygen titration method: Carpenter (1965) and Carrit and Carpenter (1966)')
  119 + elif code=='Q_OXY':
  120 + return variable('quality flag of bottle sample oxygen','(none)', 'labo','Q_OXY','DOXY_QC',1,0,'quality flag of bottle sample oxygen ')
  121 + elif code=='CHL_':
  122 + return variable('bottle sample chlorophyll content','mg/m**3', 'labo','CHL_','CPHL',1,2,'chlorophyll-a content: fluorometric method of Holm-Hansen ')
  123 + elif code=="Q_CHL":
  124 + return variable( 'quality flag of bottle sample chlorophyll content','(none)', 'labo','Q_CHL','CPHL_QC',1,0,'quality flag of bottle sample chlorophyll content')
  125 + elif code=='PHA_':
  126 + return variable('bottle sample phaeopigment content','mg/m**3', 'labo','PHA_','PHA_',1,2,'phaeopigment content: fluorometric method of Holm-Hansen, Lorenzen,')
  127 + elif code=='Q_PHA':
  128 + return variable('quality flag of bottle sample phaeopigment content','mg/m**3', 'labo','Q_PHA','PHA_QC',1,2,'quality flag of bottle sample phaeopigment content')
  129 + elif code=='NOx':
  130 + return variable('bottle sample nitrate (NO3-N) + nitrite (NO2-N) content','mmol/m**3', 'labo','NOx_','NTRZ',1,2,'nitrate content')
  131 + elif code=='NOx_':
  132 + return variable('bottle sample nitrate (NO3-N) + nitrite (NO2-N) content','mmol/m**3', 'labo','NOx_','NTRZ',1,2,'nitrate content')
  133 + elif code=='Nitrates':
  134 + return variable('bottle sample nitrate (NO3-N) + nitrite (NO2-N) content','mmol/m**3', 'labo','NOx_','NTRZ',1,2,'nitrate content')
  135 + elif code=='Q_NOx':
  136 + return variable('quality flag of bottle sample nitrate','(none)', 'labo','Q_NOx','NTRZ_QC',1,0,'quality flag of bottle ')
  137 + elif code=='TEMP_':
  138 + return variable('water temperature','deg C','terrain','TEMP_','TEMP',1,4,'temperature measurement, unknown method')
  139 + elif code=='Q_TEMP':
  140 + return variable('quality flag of water temperature','(none)','terrain','Q_TEMP','TEMP_QC',1,0,'quality flag water temperature')
  141 + elif code=='mission':
  142 + return variable('mission','(none)','terrain','mission','mission',1,0,'quality')
  143 + elif code=='bottle':
  144 + return variable('mission','(none)','terrain','bottle','bottle',1,0,'quality')
  145 + elif code=='cast':
  146 + return variable('mission','(none)','terrain','cast','cast',1,0,'quality')
  147 + elif code=='date':
  148 + return variable('mission','(none)','terrain','date','date',1,0,'quality')
  149 + elif code=='time':
  150 + return variable('mission','(none)','terrain','time','time',1,0,'quality')
  151 + else:
  152 + return 0
... ...
chargeravecbtl/src/interface.py 0 → 100644
  1 +++ a/chargeravecbtl/src/interface.py
... ... @@ -0,0 +1,110 @@
  1 +
  2 +#!/usr/bin/env python
  3 +#! python
  4 +
  5 +#####################################
  6 +#
  7 +#Conversion de fichiers excel a netCDF + chargement
  8 +#
  9 +#Auteur: Babacar THIAM
  10 +#
  11 +#$Id$
  12 +#
  13 +####################################
  14 +import xlrd
  15 +from netCDF4 import Dataset
  16 +import numpy as np
  17 +import os
  18 +from tkinter import *
  19 +from tkinter.filedialog import *
  20 +import sys
  21 +import getopt
  22 +import re
  23 +import math
  24 +import shlex
  25 +from classe_variable import variable
  26 +import usage
  27 +from netCDF4 import Dataset
  28 +import numpy as np
  29 +import os
  30 +import glob
  31 +from tkinter import *
  32 +from tkinter.filedialog import *
  33 +import testexcel as te
  34 +import databtlType as dbt
  35 +import recupdatanetcdf as rd
  36 +import testPostgres as pf
  37 +import loadjd as ld
  38 +import conn as cn
  39 +import jeudedonneesdelete as jd
  40 +
  41 +intervalle = 1.0
  42 +#On recupere les parametres d'appel
  43 +def main():
  44 +
  45 + try:
  46 + opts,args = getopt.getopt(sys.argv[1:],"i:h",["input=","help"])
  47 + except getopt.GetoptError as msg:
  48 + print(msg)
  49 + usage.usagefile()
  50 + sys.exit(2)
  51 + for o , a in opts:
  52 + if o in ("-h","--help"):
  53 + usage.usagefile()
  54 + sys.exit(2)#
  55 +
  56 + elif o in ("-i","--input"):
  57 + if a in ("-i","--input",\
  58 + "-h","--help"):
  59 + usage.usagefile()
  60 + sys.exit(2)
  61 + fnomin = a
  62 + else:
  63 + print("Option inconnue")
  64 + usage.usagefile()
  65 + sys.exit(2)
  66 + #fnomin=os.path.basename(fnomin)
  67 + fnomin=os.path.abspath(fnomin)
  68 + if not (os.path.isdir(fnomin)):
  69 + print("Choississez le repertoire des fichiers btl")
  70 + return
  71 + else:
  72 + temp=glob.glob(fnomin+'/*.xlsx')
  73 + if len(temp) <= 0 :
  74 + print("il n'existe pas de fichier btl dans ce repertoire")
  75 + else:
  76 + data_dir = os.path.join(fnomin, 'data')
  77 + if not(os.path.exists(data_dir)):
  78 + os.mkdir(data_dir)
  79 + data_dir = os.path.join(fnomin, 'log')
  80 + if not(os.path.exists(data_dir)):
  81 + os.mkdir(data_dir)
  82 + #print(te.recupTete(fnomin))
  83 + #rd.mergeAll(fnomin)
  84 + """les fichiers netcdf sont creer par: """
  85 + #print(te.creerAllbtl(fnomin))
  86 + """creer le file matsgde """
  87 + #print(rd.recupInterface(fnomin))
  88 + """chargement dans la base de donnees et archivage des donnees"""
  89 + #print(ld.chargementbtl(fnomin))
  90 + """suppression dun jeu de donnees"""
  91 + #print(jd.recupdelete(fnomin))
  92 +
  93 + #print(te.createTestbis(fnomin,"/home/thib0010/Bureau/QO/codeTest/chargerfinal/src/btl/1401007.btl"))
  94 + #
  95 + #print(te.supprimeVide(fnomin,"1306001"))
  96 + #print(te.createTestbis(fnomin,"1306001"))
  97 + #print(ld.testtampon(fnomin))
  98 + #print(rd.recupInterface(fnomin))
  99 + #print(te.csvexcel(fnomin))
  100 + #print(te.nomallliste(fnomin))
  101 + #print(ld.recupforseriebis(fnomin,j))
  102 + #print(ld.loadjeudedonnees(fnomin))
  103 + #resultatmission21(self)
  104 + #te.recupalldata(fnomin)
  105 + #print(tb.recupvaleurname(a))
  106 +
  107 +
  108 +if __name__== '__main__':
  109 + main()
  110 +#Processing des parametres
... ...
chargeravecbtl/src/jeudedonneesdelete.py 0 → 100644
  1 +++ a/chargeravecbtl/src/jeudedonneesdelete.py
... ... @@ -0,0 +1,1276 @@
  1 +import testPostgres as pf
  2 +import traceback
  3 +import sys
  4 +from tkinter import *
  5 +from tkinter import ttk, messagebox
  6 +import pandas as pd
  7 +import os
  8 +import shutil
  9 +import seconnecter as ex
  10 +#ex.bd.cursor.execute("select nextval('seq_int')")
  11 +#resultat2=ex.bd.cursor.fetchone()
  12 +#print(resultat2)
  13 +def geoliste(g):
  14 + r=[i for i in range(0,len(g)) if not g[i].isdigit()]
  15 + return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
  16 +def centrefenetre(fen):
  17 + fen.update_idletasks()
  18 + l,h,x,y=geoliste(fen.geometry())
  19 + fen.geometry("%dx%d%+d%+d" % (l,h,(fen.winfo_screenwidth()-l)//2,(fen.winfo_screenheight()-h)//2))
  20 +
  21 +class JeuDeDonneesGraphic(Tk):
  22 +
  23 + def __init__(self):
  24 + Tk.__init__(self)
  25 + #self.minsize(1200,700)
  26 + self.title('Gestion jeu de donnees:Localisation')
  27 + self.creerWidgets()
  28 +
  29 +##interface pour la mission
  30 + def creerWidgets(self):
  31 + self.mainWindow = Frame(self, bg="blue")
  32 + self.mainWindow.pack(fill=BOTH, expand=1)
  33 + self.frameSaisie = Frame(self.mainWindow, bg="blue")
  34 + self.frameSaisie.pack(fill=BOTH)
  35 + #self.frameButtoninter = Frame(self.frameSaisie, bg="blue")
  36 + #self.frameButtoninter.pack(side=LEFT)
  37 + #self.btninter = Button(self.frameButtoninter, text="Nouveau", bg="blue", fg="white")
  38 + #self.btninter.pack(padx=5, pady=5)
  39 + self.frameButtonmission = Frame(self.frameSaisie, bg="blue")
  40 + self.frameButtonmission.pack(side=LEFT)
  41 + self.btnmission = Button(self.frameButtonmission, text="modifier",font=('arial',50,'bold'),bd=4, bg="blue", fg="white", command=self.modifier)
  42 + self.btnmission.pack(padx=5, pady=5)
  43 + self.frameButtontable = Frame(self.frameSaisie, bg="blue")
  44 + self.frameButtontable.pack(side=LEFT)
  45 + self.btntable = Button(self.frameButtontable, text="supprimer",font=('arial',50,'bold'),bd=4, bg="blue", fg="white",command=self.supprimer)
  46 + self.btntable.pack(padx=5, pady=5)
  47 +
  48 + self.frameButtonnew = Frame(self.frameSaisie, bg="blue")
  49 + self.frameButtonnew.pack(side=LEFT)
  50 + self.btntablenew = Button(self.frameButtonnew, text="nouveau",font=('arial',50,'bold'),bd=4, bg="blue", fg="white",command=self.nouveauD)
  51 + self.btntablenew.pack(padx=5, pady=5)
  52 +
  53 + self.frameButtontable1 = Frame(self.frameSaisie, bg="blue")
  54 + self.frameButtontable1.pack(side=LEFT)
  55 + self.btnacceuille = Button(self.frameButtontable1, text="Acceuil",font=('arial',50,'bold'),bd=4, bg="red", fg="white")
  56 + self.btnacceuille.pack(padx=5, pady=5)
  57 +
  58 + #self.frameButtontable111 = Frame(self.frameSaisie, bg="blue")
  59 + #self.frameButtontable111.pack(side=LEFT)
  60 + #self.btnacceuille111 = Button(self.frameButtontable111, text="Particularites",font=('arial',50,'bold'),bd=4, bg="red", fg="white",command=self.particularites)
  61 + #self.btnacceuille111.pack(padx=5, pady=5)
  62 +
  63 + self.frameButtontable1111 = Frame(self.frameSaisie, bg="blue")
  64 + self.frameButtontable1111.pack(side=LEFT)
  65 + self.btnacceuille1111 = Button(self.frameButtontable1111, text="Rechercher",font=('arial',50,'bold'),bd=4, bg="red", fg="white",command=self.rechercherjd)
  66 + self.btnacceuille1111.pack(padx=5, pady=5)
  67 + #self.frameButtonOk = Frame(self.frameSaisie, bg="blue")
  68 + #self.frameButtonOk.pack(side=RIGHT)
  69 + #self.btnOk = Button(self.frameButtonOk, text="ok", bg="blue", fg="white")
  70 + #self.btnOk.pack(padx=5, pady=10)
  71 + #self.frameButtonan = Frame(self.frameSaisie, bg="blue")
  72 + #self.frameButtonan.pack(side=RIGHT)
  73 + #self.btnan = Button(self.frameButtonan, text="annuler", bg="blue", fg="white")
  74 + #self.btnan.pack(padx=5, pady=10)
  75 + self.frameButtonsauve = Frame(self.frameSaisie, bg="blue")
  76 + self.frameButtonsauve.pack(side=RIGHT)
  77 + self.btnsauve = Button(self.frameButtonsauve, text="sauvegarder",font=('arial',50,'bold'),bd=4, bg="blue", fg="white", command=self.sauvegarder)
  78 + self.btnsauve.pack(padx=5, pady=10)
  79 +
  80 + self.frameLogin = Frame(self.frameSaisie, bg="blue")
  81 + self.frameLogin.pack(side=RIGHT)
  82 + self.login = StringVar()
  83 + self.loginEntry = Entry(self.frameLogin, textvariable=self.login, width=50)
  84 + self.loginEntry.pack(padx=5, pady=5)
  85 + self.loginEntry.focus()
  86 +
  87 +
  88 + self.frameText = Frame(self.frameSaisie, bg="blue")
  89 + self.frameText.pack(side=RIGHT)
  90 + self.label = Label(self.frameText,font=('arial',50,'bold'),bd=4, text="Nom fichier", bg="blue", fg="white")
  91 + self.label.pack(padx=5, pady=5)
  92 +
  93 +
  94 + #self.dose_label.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  95 + #self.dose_entry.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  96 +
  97 +
  98 + #self.modified_label.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  99 + #self.modified_entry.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  100 + #self.exit_button.grid(row = 0, column = 3)
  101 + #self.frameResult331 = Frame(self.mainWindow, bd=4, relief=SUNKEN)
  102 + #self.frameResult331.pack(side=LEFT,expand=1,padx=10, pady=10)
  103 + self.frameResult10 = Frame(self.mainWindow)
  104 + self.frameResult10.pack(fill=BOTH)
  105 +
  106 + self.frameResult = Frame(self.frameResult10, bd=4, relief=SUNKEN)
  107 + self.frameResult.pack(side=LEFT,fill=X)
  108 + self.ent_label = Label(self.frameResult,font=('arial',50,'bold'),bd=4,bg="blue", fg="white", text="Identification:")
  109 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  110 + self.ent_label.pack(side=TOP,padx=5, pady=5)
  111 +
  112 + self.frameResult00 = Frame(self.frameResult, bd=4, relief=SUNKEN)
  113 + self.frameResult00.pack(fill=BOTH,padx=5, pady=5)
  114 + self.dose_label = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "No Sequentiel:")
  115 + #self.dose_label.configure(font=('Helvetica', 12))
  116 + #self.dose_label.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  117 + self.dose_label.grid(row =0)
  118 + self.dose = StringVar()
  119 + self.dose_entry = Entry(self.frameResult00,font=('arial',50,'bold'),bd=4,textvariable=self.dose,width=10)
  120 + #self.dose_entry.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  121 + #self.dose_entry.focus()
  122 + self.dose_entry.grid(row =0, column =1)
  123 +
  124 + #self.frameResult21 = Frame(self.frameResult10, bd=2, relief=SUNKEN)
  125 + #self.frameResult21.pack(side=LEFT,fill=Y)
  126 + self.modified_label51 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "disponibilité:")
  127 + #self.modified_label51.configure(font=('Helvetica', 12))
  128 + #self.modified_label51.pack(side=LEFT,padx=25, pady=25)
  129 + self.modified_label51.grid(row =1, column =0)
  130 +
  131 + self.modified51=StringVar()
  132 + self.modified_entry51=ttk.Combobox(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified51,state = 'readonly', background = 'blue')
  133 + #self.modified_entry5['values']=
  134 + #combo.state(['readonly'])
  135 + #combo.grid(row=0,sticky=NW)
  136 + #ex.bd.cursor.execute("select typ_jd from typ_jd order by typ_jd")
  137 + ex.bd.cursor.execute("select nom from groupe order by nom")
  138 + resultat1=ex.bd.cursor.fetchall()
  139 +
  140 + #self.modified5.set(resultat1)
  141 + self.modified_entry51["values"]=resultat1
  142 + self.modified_entry51.grid(row =1,column =1)
  143 +
  144 + #self.modified_entry51.pack(side=LEFT,padx=25, pady=25)
  145 + #self.modified_entry51.focus()
  146 +
  147 + #self.frameResult333121 = Frame(self.frameResult, bd=4, relief=SUNKEN)
  148 + #self.frameResult333121.pack(side=LEFT,fill=Y)
  149 + self.modified_label4 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "Description:")
  150 + #self.modified_label4.configure(font=('Helvetica', 12))
  151 + #self.modified_label4.pack(side=LEFT,padx=25, pady=25)
  152 + self.modified_label4.grid(row =0,column =4)
  153 + self.modified4=StringVar()
  154 + self.modified_entry4 = Entry(self.frameResult00,font=('arial',50,'bold'),bd=4,textvariable=self.modified4,width=80)
  155 + #self.modified_entry4.pack(side=LEFT,padx=25, pady=25)
  156 + #self.modified_entry4.focus()
  157 + self.modified_entry4.grid(row =1,column =4)
  158 +
  159 + #self.frameResult2112 = Frame(self.frameResult, bd=2, relief=SUNKEN)
  160 + #self.frameResult2112.pack(side=LEFT,fill=Y)
  161 + self.modified_label5 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "typ_jd:")
  162 + #self.modified_label5.configure(font=('Helvetica', 12))
  163 + self.modified_label5.grid(row =0, column =2)