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

Python Discussion :

list superposé comment faire pour enigma2 ? [Python 2.X]


Sujet :

Python

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Septembre 2014
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Septembre 2014
    Messages : 16
    Points : 1
    Points
    1
    Par défaut list superposé comment faire pour enigma2 ?
    salut
    je suis un débutant dans la langue python et j'ai beaucoup à apprendre de vous
    voila j'ai une question si vous le permettez ... merci
    j'ai une liste que je veux la superposé et je ne sais pas comment procéder....

    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
    def __init__(self, session, args = 0):
    		self.session = session
     
    		list = []
    		list.append(("ControPart", "com_three"))
    		list.append((" Informt ", "com_four"))
    		list.append(("Conf", "com_five"))
    		list.append(("Facb", "com_two"))
    		list.append(("HDMU_SoftcamControl", "com_one"))
    		list.append(("BMediaCenter", "com_sixe"))
    		list.append(("SoftcamControl", "com_seven"))
    		list.append(("SkinSelector", "com_eight"))
    		list.append(("NetworkBrowser", "com_nine"))
    		# list.append(("Panel", "com_ten"))
    		list.append((_("Exit"), "exit"))
    		Screen.__init__(self, session)
    		self["myMenu"] = MenuList(list)
    		self["myGreenBtn"] = Label(_("About"))
    		self["myActionMap"] = ActionMap(["SetupActions", "ColorActions"],
    		{
    			"ok": self.go,
    			"cancel": self.cancel,
    			"green":self.textilos,
    		}, -1)
    par exemple
    ControPart Informt Conf
    Facb HDMU BMediaCenter
    SoftcamControl SkinSelector NetworkBrowser
    Panel Exit
    par trois

    merci

  2. #2
    Expert éminent sénior
    Homme Profil pro
    Architecte technique retraité
    Inscrit en
    Juin 2008
    Messages
    21 287
    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 287
    Points : 36 776
    Points
    36 776
    Par défaut
    Salut,

    Si vous ne postez pas un code plus complet, répondre ainsi:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    >>> L = '1 2 3 4 5 6 7 8'.split()
    >>> for x in range(0, len(L), 3): L[x:x+3]
    ...
    ['1', '2', '3']
    ['4', '5', '6']
    ['7', '8']
    >>>
    ne serait pas faux mais ne vous aidera pas trop.

    - W
    Architectures post-modernes.
    Python sur DVP c'est aussi des FAQs, des cours et tutoriels

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Septembre 2014
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Septembre 2014
    Messages : 16
    Points : 1
    Points
    1
    Par défaut
    Citation Envoyé par wiztricks Voir le message
    Salut,

    Si vous ne postez pas un code plus complet, répondre ainsi:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    >>> L = '1 2 3 4 5 6 7 8'.split()
    >>> for x in range(0, len(L), 3): L[x:x+3]
    ...
    ['1', '2', '3']
    ['4', '5', '6']
    ['7', '8']
    >>>
    ne serait pas faux mais ne vous aidera pas trop.

    - W
    un grand merci a vous
    voici le code

    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
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    from Components.Input import Input
    from enigma import gFont, eListboxPythonMultiContent, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, gPixmapPtr, ePicLoad
    from Components.ScrollLabel import ScrollLabel
    from Screens.MessageBox import MessageBox
    from Screens.Screen import Screen
    from Screens.Console import Console
    from Components.MenuList import MenuList
    from Components.ActionMap import ActionMap
    from Plugins.Plugin import PluginDescriptor
    from Components.Label import Label
    from Tools.Directories import fileExists
    ###########################################################################
     
    class RassemblPluginAboutScreen(Screen):
    	skin = """
                    <screen position="100,150" size="460,400" title="Rassembl Plugin version 1.0" >
                            <widget name="text" position="10,10" size="420,380" font="Regular;20" scrollbarMode="showOnDemand" foregroundColor="yellow" />
                                            </screen>"""
     
    	def __init__(self, session):
    		Screen.__init__(self, session)
    		info="\nRassembl Plugin version 1.0-\n CODER BY ABOU YACINE ELDJAZAIRI  \n --------------------------- \n Plugin Pour Rassembler Plusieurs ...\n D'Autres Plugins\n Aime_Jeux \n --------------------------- \n                     STAR7ARAB.COM"
    		self["text"] = ScrollLabel(info)
     
    		self["actions"] = ActionMap(["SetupActions"],
    	        {
    				"ok": self.close,
    				"cancel": self.close,
     
     
    			}, -1)
    class MyShPrompt(Screen):
    	skin = """
                    <screen position="100,150" size="460,400" title="Rassembl Plugin V1.0" >
                            <widget name="myMenu" position="4,1" size="420,380" valign="center" halign="right" font="Regular;20" foregroundColor="white" scrollbarMode="showOnDemand" />
                        <widget name="myGreenBtn" position="176,359" size="124,33" valign="center" halign="centre" zPosition="2" font="Regular;20" transparent="1" foregroundColor="white" />
                            <ePixmap position="161,359" size="124,33" zPosition="0" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/Rassembl2Plugin/icons/green.png" transparent="1" alphatest="on" />
                                    </screen>"""
     
    	def __init__(self, session, args = 0):
    		self.session = session
     
    		list = []
    		list.append(("ControPart", "com_three"))
    		list.append((" Informt ", "com_four"))
    		list.append(("Conf", "com_five"))
    		list.append(("Facb", "com_two"))
    		list.append(("HDMU_SoftcamControl", "com_one"))
    		list.append(("BMediaCenter", "com_sixe"))
    		list.append(("SoftcamControl", "com_seven"))
    		list.append(("SkinSelector", "com_eight"))
    		list.append(("NetworkBrowser", "com_nine"))
    		# list.append(("Panel", "com_ten"))
    		list.append((_("Exit"), "exit"))
    		Screen.__init__(self, session)
    		self["myMenu"] = MenuList(list)
    		self["myGreenBtn"] = Label(_("About"))
    		self["myActionMap"] = ActionMap(["SetupActions", "ColorActions"],
    		{
    			"ok": self.go,
    			"cancel": self.cancel,
    			"green":self.textilos,
    		}, -1)
     
    	def go(self):
    		returnValue = self["myMenu"].l.getCurrentSelection()[1]
    		print "\n[MyShPrompt] returnValue: " + returnValue + "\n"
     
    		if returnValue is not None:
    			if returnValue is "com_one":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/HDMUCenter/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin SoftCamManager Non Insataller.....\n Voulez Vous L'installer.....")       
    				else:
    				    from Plugins.Extensions.HDMUCenter.plugin import *
    				    self.session.open(HDMU_MainMenu)     				    
     
    			if returnValue is "com_two":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/Rassembl2Plugin/WeatherPlugin/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin Weater Non Insataller.....\n Voulez Vous L'installer.....")
    				else:	
    				    from Plugins.Extensions.Rassembl2Plugin.WeatherPlugin.plugin import *
    				    self.session.open(MSNWeatherPlugin)
     
    			elif returnValue is "com_three":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/Rassembl2Plugin/Quran/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin Quran Non Insataller.....\n Voulez Vous L'installer.....")
    				else:	
    				    from Plugins.Extensions.Rassembl2Plugin.Quran.plugin import *
    				    self.session.open(StreamTVList)
     
    			elif returnValue is "com_four":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/Rassembl2Plugin/Eijjaz1/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin Eijjaz1 Non Insataller.....\n Voulez Vous L'installer.....")
    				else:	
    				    from Plugins.Extensions.Rassembl2Plugin.Eijjaz1.plugin import *
    				    self.session.open(StreamTVList)
     
    			elif returnValue is "com_five":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/Rassembl2Plugin/Qawanine_Al9or2ane/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin Qawanine_Al9or2ane Non Insataller.....\n Voulez Vous L'installer.....")
    				else:
    				    from Plugins.Extensions.Rassembl2Plugin.Qawanine_Al9or2ane.plugin import *
    				    self.session.open(StreamTVList)
     
    			elif returnValue is "com_sixe":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/BMediaCenter/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin BMediaCenter Non Insataller.....\n Voulez Vous L'installer.....")
    				else:
    				    from Plugins.Extensions.BMediaCenter.plugin import *
    				    self.session.open(HDMUMC_MainMenu)
    			elif returnValue is "com_seven":
    				if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/HDMUCenter/HDMU_SoftcamControl.pyo") == False:
    				    self.session.open(MessageBox,"Plugin HDMU_SoftcamControl Non Insataller.....\n Voulez Vous L'installer.....")
    				else:
    				    from Plugins.Extensions.HDMUCenter.HDMU_SoftcamControl import *
    				    self.session.open(HDMU_SoftcamControl)
    			elif returnValue is "com_eight":
    				if fileExists("/usr/lib/enigma2/python/Plugins/SystemPlugins/SkinSelector/plugin.pyo") == False:
    				    self.session.open(MessageBox,"Plugin SkinSelector Non Insataller.....\n Voulez Vous L'installer.....")
    				else:
    				    from Plugins.SystemPlugins.SkinSelector.plugin import *
    				    self.session.open(SkinSelector)
    			elif returnValue is "com_nine":
    				if fileExists("usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.pyo") == False:
    				    self.session.open(MessageBox,"Plugin NetworkWizard Non Insataller.....\n Voulez Vous L'installer.....")
    				else:
    				    from Plugins.SystemPlugins.NetworkWizard.NetworkWizard import *
    				    self.session.open(NetworkWizard)
    			# elif returnValue is "com_ten":
    				# if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/Rassembl2Plugin/Panel.py") == False:
    				    # self.session.open(MessageBox,"Plugin Panel Non Insataller.....\n Voulez Vous L'installer.....")
    				# else:
    				    # from Plugins.Extensions.Rassembl2Plugin.Panel import *
    				    # self.session.open(workWizard)		
    			else:
    				print "\n[MyShPrompt] cancel\n"
    				self.close(None)

  4. #4
    Expert éminent sénior
    Homme Profil pro
    Architecte technique retraité
    Inscrit en
    Juin 2008
    Messages
    21 287
    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 287
    Points : 36 776
    Points
    36 776
    Par défaut
    Salut,

    Et bien maintenant, on sait que vous travaillez avec enigma2.
    Seuls ceux qui connaissent ce framework pourront vous aider: l'engin est trop touffu pour qu'on s'amuse à l'installer et jouer avec "juste pour le fun".
    Désolé

    - W
    Architectures post-modernes.
    Python sur DVP c'est aussi des FAQs, des cours et tutoriels

  5. #5
    Nouveau Candidat au Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Septembre 2014
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Septembre 2014
    Messages : 16
    Points : 1
    Points
    1
    Par défaut
    Citation Envoyé par wiztricks Voir le message
    Salut,

    Et bien maintenant, on sait que vous travaillez avec enigma2.
    Seuls ceux qui connaissent ce framework pourront vous aider: l'engin est trop touffu pour qu'on s'amuse à l'installer et jouer avec "juste pour le fun".
    Désolé

    - W
    un grand merci wiztricks
    le temps de trouver un preneur....

  6. #6
    Nouveau Candidat au Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Septembre 2014
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Septembre 2014
    Messages : 16
    Points : 1
    Points
    1
    Par défaut
    merci a vous j'ai changé le titre

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 13
    Dernier message: 18/03/2010, 16h16
  2. Réponses: 2
    Dernier message: 20/07/2008, 10h41
  3. Réponses: 1
    Dernier message: 03/09/2007, 11h24
  4. Réponses: 7
    Dernier message: 21/04/2005, 15h55
  5. Comment faire pour récup une donnée d'une liste déroulante
    Par magic8392 dans le forum Général JavaScript
    Réponses: 8
    Dernier message: 03/03/2005, 15h00

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