IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Déploiement/Installation Python Discussion :

Traductions et images dans le code source


Sujet :

Déploiement/Installation Python

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Homme Profil pro
    Lycéen
    Inscrit en
    Février 2010
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Février 2010
    Messages : 83
    Par défaut Traductions et images dans le code source
    Bonjour.
    J'aimerais traduire mon application dans différentes langues, puis que la langue du système soit choisie. Pour cela, je sais que Gettext existe (et qu'il est même fournit sous Win par Python, donc pas besoin de faire installer aux utilisateurs GNU Gettext).
    Ensuite, je voudrais mettre des images pour la fenêtre avec Tkinter. Mais le xbm s'affiche très mal : mon image est incomplète, peut-être esse-dû aux trop nombreuses couleurs du logo ?.
    Mais le principal problème, c'est que je veux que tout soit dans un unique fichier. Je ne veux pas de py2exe, qui sera lourd et plus interopérable. Si je crée un bytecode Python, mon image n'est pas dedans, donc je suppose que pour les fichiers de traductions, c'est pareil.
    Comment centraliser le tout en un fichier ? Je veux bien qu'il y ait plusieurs fichiers sources, mais un seul et unique fichier exécutable (interprété, ou compilé si il existe un moyen de laisser l'interopérabilité).
    Et si il existe une bibliothèque qui me permette de mettre des icônes en couleurs sous Linux et que je peux intégrer dans mon fichier executable ou intégrée dans Python, ça m'intéresse aussi (tout en continuant d'utiliser Tkinter).
    Merci.

  2. #2
    Expert éminent
    Homme Profil pro
    Architecte technique retraité
    Inscrit en
    Juin 2008
    Messages
    21 790
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Manche (Basse Normandie)

    Informations professionnelles :
    Activité : Architecte technique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2008
    Messages : 21 790
    Par défaut
    Salut
    Connaissez vous les egg de setuptools?
    Les distributions de zc.buildout?
    Si oui: qu'est ce que çà ne fait pas selon vos attentes,
    Si non: commencez par là?
    Mais je ne suis pas certain d'avoir tout compris.
    - W
    Architectures post-modernes.
    Python sur DVP c'est aussi des FAQs, des cours et tutoriels

  3. #3
    Membre confirmé
    Homme Profil pro
    Lycéen
    Inscrit en
    Février 2010
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Février 2010
    Messages : 83
    Par défaut
    Merci pour votre réponse.
    Non, je ne connaissais pas. Je vais voir sur Google.

    Merci.

    ==Edit==
    Ça m'a l'air un peu compliqué. En fait, je voudrais savoir si je pouvais inclure des images dans un code comme dans le shell d'installation de Dofus : http://dl.ak.ankama.com/games/dofus2...fusInstall.run (pas le tofu, mais les images qui sont copiés dans $ ankama/Dofus/share/icons/)
    pour les utiliser directement dans ma fenetre comme ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    f.iconbitmap("Monicone.ico")
    où Monicone.ico correspondrait au code de l'image "compilée" dans le code source ou dans le bytecode.
    Et si je ne peux pas l'utiliser directement, alors copier le code binaire de l'image dans /usr/share/icons/

    Puis pour les traductions, si il n'y a pas de façon simple de faire ce que je cherche, je vais soit ne pas les faire, soit créer des variables, même si je fais tout pour limiter l'utilisation de la RAM.

    C'est possible ?

  4. #4
    Membre Expert Avatar de PauseKawa
    Homme Profil pro
    Technicien Help Desk, maintenance, réseau, système et +
    Inscrit en
    Juin 2006
    Messages
    2 725
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Technicien Help Desk, maintenance, réseau, système et +
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2006
    Messages : 2 725
    Par défaut
    Bonjour Spitfire 95,

    La première partie devrais te convenir.

    Bon code

  5. #5
    Membre Expert Avatar de PauseKawa
    Homme Profil pro
    Technicien Help Desk, maintenance, réseau, système et +
    Inscrit en
    Juin 2006
    Messages
    2 725
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Technicien Help Desk, maintenance, réseau, système et +
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2006
    Messages : 2 725
    Par défaut
    Re,

    Citation Envoyé par Spitfire 95 Voir le message
    Et si il existe une bibliothèque qui me permette de mettre des icônes en couleurs sous Linux et que je peux intégrer dans mon fichier executable ou intégrée dans Python, ça m'intéresse aussi (tout en continuant d'utiliser Tkinter)
    Si tu trouve fais moi signe. Le format tk sous X11 est monochrome, même pas bicolore... Même si tu ne mets que du rouge/bleu tu te retrouve avec du noir/blanc...

    Pour ce qui est de ma réponse précédente le but est de stocker les objets binaires (images, exécutables, etc...) sous la forme de code hexa qui ne pose pas problème à la lecture du code. Soit en fait de créer un setup.py avec tout ce qui est nécessaire dedans. Ce que tu recherche il me semble
    L'idée viens de l'utilisation du code d'une image pour PhotoImage, ce que tu as du déjà voir sur le net, et sur un script d'installation sous tux.

    @+

  6. #6
    Membre confirmé
    Homme Profil pro
    Lycéen
    Inscrit en
    Février 2010
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Février 2010
    Messages : 83
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    f.iconbitmap("23646566696e652063616c63756c6174726963655f77696474682034350a23646566696e652063616c63756c6174726963655f6865696768742034350a73746174696320756e7369676e656420636861722063616c63756c6174726963655f626974735b5d203d207b0a202020307830302c20307830302c20307866652c20307830372c20307830302c20307830302c20307830302c20307863302c20307866662c20307833662c20307830302c20307830302c0a202020307830302c20307865302c20307866662c20307866662c20307830302c20307830302c20307830302c20307866302c20307866662c20307866662c20307830312c20307830302c0a202020307830302c20307837302c20307866632c20307866662c20307830312c20307830302c20307830302c20307833302c20307866632c20307866662c20307830312c20307830302c0a202020307830302c20307837302c20307866632c20307866662c20307830312c20307830302c20307830302c20307866302c20307866662c20307866662c20307830332c20307830302c0a202020307830302c20307866382c20307866662c20307866662c20307830332c20307830302c20307830302c20307866382c20307866662c20307866662c20307830332c20307830302c0a202020307830302c20307862302c20307864642c20307866662c20307830332c20307830302c20307830302c20307837632c20307861312c20307864362c20307830332c20307830302c0a202020307866302c20307866662c20307862652c20307866642c20307830322c20307830302c20307866382c20307865662c20307865642c20307865622c20307830332c20307830302c0a202020307866632c20307866662c20307837662c20307866662c20307830332c20307830302c20307866652c20307862662c20307866662c20307866662c20307830332c20307830302c0a202020307866652c20307866662c20307866662c20307836662c20307830332c20307830302c20307866652c20307866662c20307866662c20307866662c20307830332c20307830302c0a202020307866662c20307866662c20307866662c20307866662c20307830312c20307830302c20307866662c20307866662c20307866662c20307864662c20307830312c20307830302c0a202020307866662c20307866662c20307862652c20307837662c20307830302c20307830302c20307866662c20307866662c20307866662c20307837622c20307830302c20307830302c0a202020307866662c20307837662c20307830302c20307830302c20307830302c20307830302c20307866662c20307839662c20307830302c20307835302c20307830312c20307830302c0a202020307866662c20307830662c20307832342c20307830312c20307830302c20307830302c20307866662c20307830372c20307830302c20307832302c20307830302c20307830302c0a202020307866662c20307834372c20307830302c20307830322c20307830312c20307830302c20307866662c20307830372c20307832342c20307832302c20307830302c20307830302c0a202020307866652c20307838372c20307830302c20307838382c20307830302c20307830302c20307866652c20307830662c20307832302c20307830302c20307830302c20307830302c0a202020307866632c20307830372c20307830322c20307831302c20307830312c20307830302c20307866632c20307834662c20307830342c20307832312c20307830302c20307830302c0a202020307866382c20307830372c20307830302c20307830302c20307830312c20307830302c20307865302c20307838372c20307834382c20307837342c20307830322c20307830302c0a202020307830302c20307830382c20307830302c20307830302c20307830302c20307830302c20307830302c20307830382c20307830302c20307830302c20307830302c20307830302c0a202020307830302c20307838302c20307831322c20307839312c20307830322c20307830302c20307830302c20307831302c20307832302c20307830322c20307830302c20307830302c0a202020307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c0a202020307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c0a202020307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c20307830302c0a202020307830302c20307830302c20307830302c20307830302c20307830302c2030783030207d3b0a")
    Ça ne fonctionne pas. Si je crée un fichier .xbm contenant ça, ni GIMP, ni Google Chrome (mon navigateur internet, lecteur multimédia et visionneur d'images) ne parviennent à l'ouvrir.
    Le code, après modifications (pour avoir le résultat en console) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    #!/usr/bin/env python
    # -*- coding: UTF-8 -*-
     
    import binascii
     
    def lirefichier(fichier):
        f=open(fichier, 'rb')
        donnees = f.read()
        f.close()
        return binascii.b2a_hex(donnees)
     
    print lirefichier('calculatrice.xbm')
    Et si je lis l'image sans convertir, j'obtient un code en C :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    #define calculatrice_width 45
    #define calculatrice_height 45
    static unsigned char calculatrice_bits[] = {
       0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00,
       0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x00,
       0x00, 0x70, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x30, 0xfc, 0xff, 0x01, 0x00,
       0x00, 0x70, 0xfc, 0xff, 0x01, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
       0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00,
       0x00, 0xb0, 0xdd, 0xff, 0x03, 0x00, 0x00, 0x7c, 0xa1, 0xd6, 0x03, 0x00,
       0xf0, 0xff, 0xbe, 0xfd, 0x02, 0x00, 0xf8, 0xef, 0xed, 0xeb, 0x03, 0x00,
       0xfc, 0xff, 0x7f, 0xff, 0x03, 0x00, 0xfe, 0xbf, 0xff, 0xff, 0x03, 0x00,
       0xfe, 0xff, 0xff, 0x6f, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x03, 0x00,
       0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0xff, 0xdf, 0x01, 0x00,
       0xff, 0xff, 0xbe, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7b, 0x00, 0x00,
       0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x9f, 0x00, 0x50, 0x01, 0x00,
       0xff, 0x0f, 0x24, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x20, 0x00, 0x00,
       0xff, 0x47, 0x00, 0x02, 0x01, 0x00, 0xff, 0x07, 0x24, 0x20, 0x00, 0x00,
       0xfe, 0x87, 0x00, 0x88, 0x00, 0x00, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00,
       0xfc, 0x07, 0x02, 0x10, 0x01, 0x00, 0xfc, 0x4f, 0x04, 0x21, 0x00, 0x00,
       0xf8, 0x07, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x87, 0x48, 0x74, 0x02, 0x00,
       0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x80, 0x12, 0x91, 0x02, 0x00, 0x00, 0x10, 0x20, 0x02, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
    Mais Tkinter n'accepte pas le tupple obtenu.
    Merci.

  7. #7
    Membre Expert Avatar de PauseKawa
    Homme Profil pro
    Technicien Help Desk, maintenance, réseau, système et +
    Inscrit en
    Juin 2006
    Messages
    2 725
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Technicien Help Desk, maintenance, réseau, système et +
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2006
    Messages : 2 725
    Par défaut
    Bonjour,

    Pour ce qui est de ma réponse précédente le but est de stocker les objets binaires (images, exécutables, etc...) sous la forme de code hexa qui ne pose pas problème à la lecture du code.

    binascii.b2a_hex/binascii.a2b_hex

    @+

  8. #8
    Membre confirmé
    Homme Profil pro
    Lycéen
    Inscrit en
    Février 2010
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Février 2010
    Messages : 83
    Par défaut
    Si je copie le code retourné par le terminal avec cat ou par la fonction read de python dans un fichier .xbm, GIMP parviens à le lire et Tkinter réussit à l'ouvrir en temps qu'icône de fenêtre.
    Mais si je lui donne ce code dans la méthode iconbitmap, il n'y arrive pas
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    f.iconbitmap("""
    #define calculatrice_width 45
    #define calculatrice_height 45
    static unsigned char calculatrice_bits[] = {
       0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00,
       0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x00,
       0x00, 0x70, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x30, 0xfc, 0xff, 0x01, 0x00,
       0x00, 0x70, 0xfc, 0xff, 0x01, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x00,
       0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0xff, 0x7f, 0x04, 0x00,
       0xf0, 0xc7, 0xff, 0x7f, 0xfc, 0x01, 0xf8, 0xc7, 0xff, 0x7f, 0xfc, 0x03,
       0xfc, 0xc7, 0xff, 0x7f, 0xfc, 0x07, 0xfe, 0x07, 0x00, 0x00, 0xfc, 0x0f,
       0xfe, 0xc7, 0x18, 0x63, 0xfc, 0x0f, 0xff, 0x27, 0xa5, 0x94, 0xfc, 0x0f,
       0xff, 0x27, 0xa5, 0x94, 0xfc, 0x1f, 0xff, 0xc7, 0x18, 0x63, 0xfc, 0x1f,
       0xff, 0x07, 0x00, 0x00, 0xfc, 0x1f, 0xff, 0xc7, 0x18, 0x63, 0xfc, 0x1f,
       0xff, 0x27, 0xa5, 0x94, 0xfc, 0x1f, 0xff, 0x27, 0xa5, 0x94, 0xfc, 0x1f,
       0xff, 0xc7, 0x18, 0x63, 0xfc, 0x1f, 0xff, 0x07, 0x00, 0x00, 0xfc, 0x1f,
       0xff, 0xc7, 0x18, 0x63, 0xfc, 0x1f, 0xff, 0x27, 0xa5, 0x94, 0xfc, 0x1f,
       0xfe, 0x27, 0xa5, 0x94, 0xfc, 0x0f, 0xfe, 0xc7, 0x18, 0x63, 0xfc, 0x0f,
       0xfc, 0x07, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0xc7, 0x18, 0x63, 0xfc, 0x07,
       0xf8, 0x27, 0xa5, 0x94, 0xfc, 0x03, 0xe0, 0x27, 0xa5, 0x94, 0xfc, 0x00,
       0x00, 0xc0, 0x18, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x00,
       0x00, 0xf8, 0xff, 0xc7, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x87, 0x03, 0x00,
       0x00, 0xf0, 0xff, 0xc7, 0x01, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x00,
       0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00,
       0x00, 0x00, 0xfd, 0x0b, 0x00, 0x00 };
    """)
    Pourtant, la méthode iconbitmap va chercher le contenu de l'image, non ? Alors comme entrer ce code ?
    Merci.

  9. #9
    Membre Expert Avatar de PauseKawa
    Homme Profil pro
    Technicien Help Desk, maintenance, réseau, système et +
    Inscrit en
    Juin 2006
    Messages
    2 725
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Technicien Help Desk, maintenance, réseau, système et +
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2006
    Messages : 2 725
    Par défaut
    Bonjour,

    Je ne sais pas si cela fonctionne sous Windows mais...

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    import Tkinter
    import os
     
    # Code optenu avec base64.b64encode
    origindata ="""R0lGODlhMAAwAIcAAQAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjM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tXiGoTEjiCR1RwQlTWIsKDqOFe+vDTwx3MUNBeUISTcjKHfBUtlz4woL3KUYwZPiKVIgCFIioQVYEAoZLIA1EuzhQMMY4RV+wKG6muAQctLjFRXlBE6kY0s1wVsVO1EEFbeRWEtYgwVYArBWmoAQcqoDHPCpEBVMAwxgWiYUeOM6QkIykJCdJyUpa8iEBAQA7"""
     
    #with open(os.path.join(os.getcwd(), 'codeimage.txt'), 'rb') as photo:
    #    origindata = photo.read()
     
    root= Tkinter.Tk()
    imagecode = Tkinter.PhotoImage(data = origindata)
    root.tk.call('wm', 'iconphoto', root._w, imagecode)
    root.mainloop()

Discussions similaires

  1. Réponses: 15
    Dernier message: 23/01/2007, 16h27
  2. Embarquer une image dans le code
    Par hisy dans le forum Langage
    Réponses: 3
    Dernier message: 06/11/2006, 11h01
  3. Script invisible dans le code source
    Par Erika dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 11/10/2006, 17h32
  4. Réponses: 8
    Dernier message: 15/07/2006, 19h59
  5. Affichage de caractère spéciaux absent dans le code source
    Par HNT dans le forum Général Conception Web
    Réponses: 4
    Dernier message: 03/11/2005, 23h38

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo