Personal tools
You are here: Home Forum How to use Salome? Nouvelle interface SWIG et module Python

Nouvelle interface SWIG et module Python

Up to How to use Salome?
  • Nouvelle interface SWIG et module Python

    Posted by DAVID Gilles at October 20. 2006
    J'essaie de mettre à jour l'interface GUI de DATA en me basant sur le module PYHELLO.
    Au début du fichier, des variables privées sont définies :
    # module name
    __MODULE_NAME__ = "PYHELLO"
    __MODULE_ID__   = 1000
    __OBJECT_ID__   = 1010
    Les valeurs de __MODULE_ID__ et __OBJECT_ID__ sont-elle prises au hasard ? Je suppose qu'elles doivent être unique et liées et au module ? Comment savoir les valeurs qui sont déjà prises ?

    Sinon, de manière plus générale, il y a t'il un document qui explique comment faire la migration salome 2.x.x -> salome 3.2.2, en particulier pour l'interface graphique ?
    • Re: Nouvelle interface SWIG et module Python

      Posted by DAVID Gilles at October 25. 2006
      DAVID Gilles wrote:
      J'essaie de mettre à jour l'interface GUI de DATA en me basant sur le module PYHELLO.
      Au début du fichier, des variables privées sont définies :
      # module name
      __MODULE_NAME__ = "PYHELLO"
      __MODULE_ID__   = 1000
      __OBJECT_ID__   = 1010
      Les valeurs de __MODULE_ID__ et __OBJECT_ID__ sont-elle prises au hasard ? Je suppose qu'elles doivent être unique et liées et au module ? Comment savoir les valeurs qui sont déjà prises ?

      Sinon, de manière plus générale, il y a t'il un document qui explique comment faire la migration salome 2.x.x -> salome 3.2.2, en particulier pour l'interface graphique ?


      No answer :(
      I try in english :

      I'm updating the GUI for DATA module with the example of the PYHELLO module for salome version 3.2.2.
      Some private variables are defined at the beginning of the file PYHELLOGUI.py:

      # module name
      __MODULE_NAME__ = "PYHELLO"
      __MODULE_ID__   = 1000
      __OBJECT_ID__   = 1010

      I would like to know how were chosen the values "1000" and "1010" ? I suppose that they must be unique and linked to the module ? How do we know if a value is not already used by another module ?

      In a more general way, I would like to know if their is some documentation to migrate Python modules from salome V2.xx to v3.22  ? More precisely, the GUI migration is a problem for me.

      Thanks
      • Re: Nouvelle interface SWIG et module Python

        Posted by Vadim SANDLER at October 27. 2006
        Hello Gilles,

        ID values for actions in the sample PYHELLO module have been chosen arbitrary.
        ID values should be unique in frames of one module and can duplicate the ID values from the other modules - this will not cause any troubles - SALOME GUI takes care about this.
        Thus, you can assign any values you want not worrying about possible intersections with other modules.

        In general, porting of Python modules from SALOME2 to SALOME3 GUI should not cause any problems. What worked in SALOME2 should also work in SALOME3. Old Python API is still supported in SALOME3 GUI to provide the compatibility with Python modules developped for SALOME2.
        The porting to the new (SALOME3 GUI) API is only needed if you want to get rid of obsolete code and take advance of new functionality.

        For example, XML files which were used for menu and toolbars definition in SALOME2 are still supported in SALOME3 GUI, but this functionality is considered to be obsolete. Instead you can implement initialize() method in you GUI module and use SalomePyQt interface to create menus and toolbars: createMenu(), createTool() family of methods, etc...

        It is also possible to mix both approaches.

        Regards,
        Vadim.
        • Re: Nouvelle interface SWIG et module Python

          Posted by DAVID Gilles at November 06. 2006

          Hi again Vadim,

          Now I would like to generate dynamically actions in a popup.

          In Salome V2, I inserted a popup item with the command:

          popup.insertItem( commandText, receiver, member, accel = 0, id = commandId, index = -1 )

          where the member function called was: receiver.onDispatch(int) and which led to the call of the method DATAGUI().OnGuiEvent(commandId).

          Now in Salome V3, I added the creation of an action for the item : sgPyQt.createAction(commandID, commandText) and I still use the same method for adding the item in the popup. This mechanism does not work anymore : when I click on an item, nothing happens, the program does not enter in the function OnGuiEvent(commandId).
          What changed for me is that the receiver is now the desktop (before it was an instance of DATAGUI). Maybe the receiver is not the good one ? Or maybe the slot is not good anymore ?

          Regards,
          Gilles
          • Re: Nouvelle interface SWIG et module Python

            Posted by Vadim SANDLER at November 07. 2006
            Hello Gilles,

            If you use actions (QAction) you need to use its method addTo() to insert the item to the popup menu instead of insertItem():
            ...
            a = sgPyQt.createAction(commandID, commandText)
            ...
            a.addTo(popup)
            ...

            In this case OnGUIEvent(commandID) method is called when the menu item is activated by the user.

            You can still use insertItem() method to customize the popup menu but in this case you need to connect the item to some slot directly:

            ...
            def itemSlot():
              print "itemSlot() is called"
              return

            ...
            popup.insertItem(commandText, commandId)
            popup.connectItem(commandId, itemSlot)
            ...

            and process the command in the itemSlot() function.

            Note: there is no safe method to remove the action in SALOME GUI, so all the actions once created live till the application closes. Thus, the best way is to create actions only once (e.g. in the initialize() function) and then use them when necessary (e.g. when popup menu is created).
            The menu dispatching is usually processed via OnGUIEvent(commandId) method. You can also connect each action directly to some slot function and do not process it in the OnGUIEvent(commandId) function. But in this case you need to connect the action ONLY ONCE, otherwise the slot will be called a lot of times. For example:

            __action__map__ = {}

            def action1Slot():
                print "action1Slot() is called"
                return

            def action2Slot():
                print "action2Slot() is called"
                return

            def initialize():
                global __action__map__
                a1 = sgPyQt.createAction(1001, "Action 1001";)
                a1.connect(a1, SIGNAL("activated()";), action1Slot)
                __action__map__[1001] = a1
                a2 = sgPyQt.createAction(1002, "Action 1002";)
                a2.connect(a2, SIGNAL("activated()";), action2Slot)
                __action__map__[1002] = a2
                ...
               return

            def createPopupMenu( popup, context ):
               ...
               __action__map__[1001].addTo(popup)
               __action__map__[1002].addTo(popup)
               ...      
               return

            def OnGUIEvent(commandID) :
                # do not process id 1001, 1002
                ...

            All the ways are possible. You can use any of them depending on what you prefer.

            Regards,
            Vadim.
            • Re: Nouvelle interface SWIG et module Python

              Posted by DAVID Gilles at November 07. 2006
              Hello Vadim,

              Really thank you for your answer, now I understand better how to manage my problem.
              But (there is always a "but" ), when trying to use the method "addTo" on the action, I have an AttributeError. In fact, none of the methods specified in QtxAction.hxx are available on the action.
              To reproduce my error, try this in the Python interpreter window of Salome:

              import SalomePyQt

              sgPyQt = SalomePyQt.SalomePyQt()

              action = sgPyQt.createAction(50000,"myAction";)

              print action.addTo

              Traceback (most recent call last):

                File "", line 1, in ?

              AttributeError: addTo


              Regards,
              Gilles
              • Re: Nouvelle interface SWIG et module Python

                Posted by Vadim SANDLER at November 07. 2006
                Hello Gilles,

                Could you please do the following in your python code:

                import SalomePyQt
                sg = SalomePyQt.SalomePyQt()
                a = sg.createAction(5000, "myAction";)
                print a
                print a.__class__
                print dir(a)

                and sent me what is printed in the console. I need this information for the detail analysis.
                In addition please could you please specify in more detail:
                - what Linux platform do you use?
                - what SALOME version do you use?
                - did you change environment for any SALOME products or use environment generated by the SALOME Installation Wizard?

                Thanks,
                Vadim.
                • Re: Nouvelle interface SWIG et module Python

                  Posted by DAVID Gilles at November 07. 2006
                  Here are the results of the commands :

                  >>> a = sgPyQt.createAction(5000, "myAction";)
                  >>> print a

                  >>> print a.__class__

                  >>> print dir(a)
                  ['ALT', 'ASCII_ACCEL', 'AlignAuto', 'AlignBottom', 'AlignCenter', 'AlignHCenter', 'AlignHorizontal_Mask', 'AlignJustify', 'AlignLeft', 'AlignRight', 'AlignTop', 'AlignVCenter', 'AlignVertical_Mask', 'AlignmentFlags', 'AlphaDither_Mask', 'AltButton', 'AnchorAttribute', 'AnchorHref', 'AnchorName', 'AndNotROP', 'AndROP', 'ArrowCursor', 'ArrowType', 'Ascending', 'AutoColor', 'AutoDither', 'AutoText', 'AvoidDither', 'BDiagPattern', 'BGMode', 'BackgroundMode', 'BeginsWith', 'BevelJoin', 'BitmapCursor', 'BlankCursor', 'BottomLeft', 'BottomRight', 'BreakAnywhere', 'BrushStyle', 'BusyCursor', 'ButtonState', 'CTRL', 'CaseSensitive', 'ClearROP', 'ColorMode_Mask', 'ColorOnly', 'ColorSpec', 'Contains', 'ControlButton', 'CopyROP', 'Corner', 'CrossCursor', 'CrossPattern', 'CursorShape', 'CustomColor', 'CustomPattern', 'DashDotDotLine', 'DashDotLine', 'DashLine', 'DateFormat', 'DefaultCodec', 'Dense1Pattern', 'Dense2Pattern', 'Dense3Pattern', 'Dense4Pattern', 'Dense5Pattern', 'Dense6Pattern', 'Dense7Pattern', 'Descending', 'DiagCrossPattern', 'DiffuseAlphaDither', 'DiffuseDither', 'DitherMode_Mask', 'Dither_Mask', 'Dock', 'DockBottom', 'DockLeft', 'DockMinimized', 'DockRight', 'DockTop', 'DockTornOff', 'DockUnmanaged', 'DontClip', 'DontPrint', 'DotLine', 'DownArrow', 'Encoding', 'EndsWith', 'EraseROP', 'ExactMatch', 'ExpandTabs', 'FDiagPattern', 'FixedColor', 'FixedPixmap', 'FlatCap', 'ForbiddenCursor', 'GUIStyle', 'GuiClient', 'GuiServer', 'HorPattern', 'Horizontal', 'ISODate', 'IbeamCursor', 'Identical', 'ImageConversionFlags', 'Key', 'KeyButtonMask', 'Key_0', 'Key_1', 'Key_2', 'Key_3', 'Key_4', 'Key_5', 'Key_6', 'Key_7', 'Key_8', 'Key_9', 'Key_A', 'Key_AE', 'Key_Aacute', 'Key_Acircumflex', 'Key_Adiaeresis', 'Key_Agrave', 'Key_Alt', 'Key_Ampersand', 'Key_Any', 'Key_Apostrophe', 'Key_Aring', 'Key_AsciiCircum', 'Key_AsciiTilde', 'Key_Asterisk', 'Key_At', 'Key_Atilde', 'Key_B', 'Key_Back', 'Key_BackSpace', 'Key_BackTab', 'Key_Backslash', 'Key_Backspace', 'Key_Backtab', 'Key_Bar', 'Key_BassBoost', 'Key_BassDown', 'Key_BassUp', 'Key_BraceLeft', 'Key_BraceRight', 'Key_BracketLeft', 'Key_BracketRight', 'Key_C', 'Key_CapsLock', 'Key_Ccedilla', 'Key_Clear', 'Key_Colon', 'Key_Comma', 'Key_Control', 'Key_D', 'Key_Delete', 'Key_Direction_L', 'Key_Direction_R', 'Key_Dollar', 'Key_Down', 'Key_E', 'Key_ETH', 'Key_Eacute', 'Key_Ecircumflex', 'Key_Ediaeresis', 'Key_Egrave', 'Key_End', 'Key_Enter', 'Key_Equal', 'Key_Escape', 'Key_Exclam', 'Key_F', 'Key_F1', 'Key_F10', 'Key_F11', 'Key_F12', 'Key_F13', 'Key_F14', 'Key_F15', 'Key_F16', 'Key_F17', 'Key_F18', 'Key_F19', 'Key_F2', 'Key_F20', 'Key_F21', 'Key_F22', 'Key_F23', 'Key_F24', 'Key_F25', 'Key_F26', 'Key_F27', 'Key_F28', 'Key_F29', 'Key_F3', 'Key_F30', 'Key_F31', 'Key_F32', 'Key_F33', 'Key_F34', 'Key_F35', 'Key_F4', 'Key_F5', 'Key_F6', 'Key_F7', 'Key_F8', 'Key_F9', 'Key_Favorites', 'Key_Forward', 'Key_G', 'Key_Greater', 'Key_H', 'Key_Help', 'Key_Home', 'Key_HomePage', 'Key_Hyper_L', 'Key_Hyper_R', 'Key_I', 'Key_Iacute', 'Key_Icircumflex', 'Key_Idiaeresis', 'Key_Igrave', 'Key_Insert', 'Key_J', 'Key_K', 'Key_L', 'Key_Launch0', 'Key_Launch1', 'Key_Launch2', 'Key_Launch3', 'Key_Launch4', 'Key_Launch5', 'Key_Launch6', 'Key_Launch7', 'Key_Launch8', 'Key_Launch9', 'Key_LaunchA', 'Key_LaunchB', 'Key_LaunchC', 'Key_LaunchD', 'Key_LaunchE', 'Key_LaunchF', 'Key_LaunchMail', 'Key_LaunchMedia', 'Key_Left', 'Key_Less', 'Key_M', 'Key_MediaLast', 'Key_MediaNext', 'Key_MediaPlay', 'Key_MediaPrev', 'Key_MediaRecord', 'Key_MediaStop', 'Key_Menu', 'Key_Meta', 'Key_Minus', 'Key_N', 'Key_Next', 'Key_Ntilde', 'Key_NumLock', 'Key_NumberSign', 'Key_O', 'Key_Oacute', 'Key_Ocircumflex', 'Key_Odiaeresis', 'Key_Ograve', 'Key_Ooblique', 'Key_OpenUrl', 'Key_Otilde', 'Key_P', 'Key_PageDown', 'Key_PageUp', 'Key_ParenLeft', 'Key_ParenRight', 'Key_Pause', 'Key_Percent', 'Key_Period', 'Key_Plus', 'Key_Print', 'Key_Prior', 'Key_Q', 'Key_Question', 'Key_QuoteDbl', 'Key_QuoteLeft', 'Key_R', 'Key_Refresh', 'Key_Return', 'Key_Right', 'Key_S', 'Key_ScrollLock', 'Key_Search', 'Key_Semicolon', 'Key_Shift', 'Key_Slash', 'Key_Space', 'Key_Standby', 'Key_Stop', 'Key_Super_L', 'Key_Super_R', 'Key_SysReq', 'Key_T', 'Key_THORN', 'Key_Tab', 'Key_TrebleDown', 'Key_TrebleUp', 'Key_U', 'Key_Uacute', 'Key_Ucircumflex', 'Key_Udiaeresis', 'Key_Ugrave', 'Key_Underscore', 'Key_Up', 'Key_V', 'Key_VolumeDown', 'Key_VolumeMute', 'Key_VolumeUp', 'Key_W', 'Key_X', 'Key_Y', 'Key_Yacute', 'Key_Z', 'Key_aacute', 'Key_acircumflex', 'Key_acute', 'Key_adiaeresis', 'Key_ae', 'Key_agrave', 'Key_aring', 'Key_atilde', 'Key_brokenbar', 'Key_ccedilla', 'Key_cedilla', 'Key_cent', 'Key_copyright', 'Key_currency', 'Key_degree', 'Key_diaeresis', 'Key_division', 'Key_eacute', 'Key_ecircumflex', 'Key_ediaeresis', 'Key_egrave', 'Key_eth', 'Key_exclamdown', 'Key_guillemotleft', 'Key_guillemotright', 'Key_hyphen', 'Key_iacute', 'Key_icircumflex', 'Key_idiaeresis', 'Key_igrave', 'Key_macron', 'Key_masculine', 'Key_mu', 'Key_multiply', 'Key_nobreakspace', 'Key_notsign', 'Key_ntilde', 'Key_oacute', 'Key_ocircumflex', 'Key_odiaeresis', 'Key_ograve', 'Key_onehalf', 'Key_onequarter', 'Key_onesuperior', 'Key_ordfeminine', 'Key_oslash', 'Key_otilde', 'Key_paragraph', 'Key_periodcentered', 'Key_plusminus', 'Key_questiondown', 'Key_registered', 'Key_section', 'Key_ssharp', 'Key_sterling', 'Key_thorn', 'Key_threequarters', 'Key_threesuperior', 'Key_twosuperior', 'Key_uacute', 'Key_ucircumflex', 'Key_udiaeresis', 'Key_ugrave', 'Key_unknown', 'Key_yacute', 'Key_ydiaeresis', 'Key_yen', 'Keypad', 'LastCursor', 'LastROP', 'LeftArrow', 'LeftButton', 'LocalDate', 'LocalTime', 'LogText', 'META', 'MODIFIER_MASK', 'MPenCapStyle', 'MPenJoinStyle', 'MPenStyle', 'ManyColor', 'MetaButton', 'MidButton', 'MiterJoin', 'Modifier', 'MonoOnly', 'MotifStyle', 'MouseButtonMask', 'NandROP', 'NoAccel', 'NoBackground', 'NoBrush', 'NoButton', 'NoMatch', 'NoPen', 'NopROP', 'NorROP', 'NormalColor', 'NotAndROP', 'NotCopyROP', 'NotEraseROP', 'NotOrROP', 'NotROP', 'NotXorROP', 'OpaqueMode', 'OrNotROP', 'OrROP', 'OrderedAlphaDither', 'OrderedDither', 'Orientation', 'PaletteBackground', 'PaletteBase', 'PaletteBrightText', 'PaletteButton', 'PaletteButtonText', 'PaletteDark', 'PaletteForeground', 'PaletteHighlight', 'PaletteHighlightedText', 'PaletteLight', 'PaletteLink', 'PaletteLinkVisited', 'PaletteMid', 'PaletteMidlight', 'PaletteShadow', 'PaletteText', 'PartialMatch', 'PenCapStyle', 'PenJoinStyle', 'PenStyle', 'PlainText', 'PointingHandCursor', 'PreferDither', 'RasterOp', 'RichText', 'RightArrow', 'RightButton', 'RoundCap', 'RoundJoin', 'SHIFT', 'SequenceMatch', 'SetROP', 'ShiftButton', 'ShowPrefix', 'SingleLine', 'SizeAllCursor', 'SizeBDiagCursor', 'SizeFDiagCursor', 'SizeHorCursor', 'SizeVerCursor', 'SolidLine', 'SolidPattern', 'SortOrder', 'SplitHCursor', 'SplitVCursor', 'SquareCap', 'StringComparisonMode', 'TextDate', 'TextFlags', 'TextFormat', 'ThresholdAlphaDither', 'ThresholdDither', 'TimeSpec', 'TopLeft', 'TopRight', 'TransparentMode', 'Tty', 'Type', 'UIEffect', 'UI_AnimateCombo', 'UI_AnimateMenu', 'UI_AnimateToolBox', 'UI_AnimateTooltip', 'UI_FadeMenu', 'UI_FadeTooltip', 'UI_General', 'UNICODE_ACCEL', 'UTC', 'UnicodeUTF8', 'UpArrow', 'UpArrowCursor', 'VerPattern', 'Vertical', 'WDestructiveClose', 'WGroupLeader', 'WMouseNoMask', 'WNoAutoErase', 'WNoMousePropagation', 'WPaintClever', 'WPaintDesktop', 'WPaintUnclipped', 'WRepaintNoErase', 'WResizeNoErase', 'WShowModal', 'WState_Polished', 'WStaticContents', 'WStyle_ContextHelp', 'WStyle_Customize', 'WStyle_DialogBorder', 'WStyle_Mask', 'WStyle_Maximize', 'WStyle_MinMax', 'WStyle_Minimize', 'WStyle_NoBorder', 'WStyle_NormalBorder', 'WStyle_Reserved', 'WStyle_Splash', 'WStyle_StaysOnTop', 'WStyle_SysMenu', 'WStyle_Title', 'WStyle_Tool', 'WSubWindow', 'WType_Desktop', 'WType_Dialog', 'WType_Mask', 'WType_Popup', 'WType_TopLevel', 'WV_2000', 'WV_2003', 'WV_32s', 'WV_95', 'WV_98', 'WV_CE', 'WV_CENET', 'WV_CE_based', 'WV_DOS_based', 'WV_Me', 'WV_NT', 'WV_NT_based', 'WV_XP', 'WWinOwnDC', 'WX11BypassWM', 'WaitCursor', 'WhatsThisCursor', 'WidgetFlags', 'WidgetState', 'WindowActive', 'WindowFullScreen', 'WindowMaximized', 'WindowMinimized', 'WindowNoState', 'WindowState', 'WindowsStyle', 'WindowsVersion', 'WordBreak', 'X11ParentRelative', 'XorROP', '__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', 'aboutQt', 'activeModalWidget', 'activePopupWidget', 'activeWindow', 'addLibraryPath', 'addedTo', 'allWidgets', 'applicationDirPath', 'applicationFilePath', 'argc', 'argv', 'arrowCursor', 'beep', 'black', 'blankCursor', 'blockSignals', 'blue', 'busyCursor', 'child', 'childEvent', 'children', 'className', 'clipboard', 'closeAllWindows', 'closingDown', 'color0', 'color1', 'colorSpec', 'commitData', 'connect', 'crossCursor', 'cursorFlashTime', 'customEvent', 'cyan', 'darkBlue', 'darkCyan', 'darkGray', 'darkGreen', 'darkMagenta', 'darkRed', 'darkYellow', 'defaultCodec', 'deleteLater', 'desktop', 'desktopSettingsAware', 'disconnect', 'doubleClickInterval', 'dumpObjectInfo', 'dumpObjectTree', 'emit', 'enter_loop', 'event', 'eventFilter', 'eventLoop', 'exec_loop', 'exit', 'exit_loop', 'flush', 'flushX', 'focusWidget', 'font', 'fontMetrics', 'forbiddenCursor', 'globalStrut', 'gray', 'green', 'hasGlobalMouseTracking', 'hasPendingEvents', 'highPriority', 'horizontalAlignment', 'ibeamCursor', 'inherits', 'insertChild', 'installEventFilter', 'installTranslator', 'isA', 'isEffectEnabled', 'isSessionRestored', 'isWidgetType', 'killTimer', 'killTimers', 'libraryPaths', 'lightGray', 'lock', 'locked', 'loopLevel', 'magenta', 'mainWidget', 'metaObject', 'name', 'notify', 'objectTrees', 'overrideCursor', 'palette', 'parent', 'pointingHandCursor', 'polish', 'postEvent', 'processEvents', 'processOneEvent', 'property', 'queryList', 'quit', 'red', 'removeChild', 'removeEventFilter', 'removeLibraryPath', 'removePostedEvents', 'removeTranslator', 'restoreOverrideCursor', 'reverseLayout', 'saveState', 'sendEvent', 'sendPostedEvents', 'sender', 'sessionId', 'sessionKey', 'setColorSpec', 'setCursorFlashTime', 'setDefaultCodec', 'setDesktopSettingsAware', 'setDoubleClickInterval', 'setEffectEnabled', 'setFont', 'setGlobalMouseTracking', 'setGlobalStrut', 'setLibraryPaths', 'setMainWidget', 'setName', 'setOverrideCursor', 'setPalette', 'setProperty', 'setReverseLayout', 'setStartDragDistance', 'setStartDragTime', 'setStyle', 'setWheelScrollLines', 'signalsBlocked', 'sizeAllCursor', 'sizeBDiagCursor', 'sizeFDiagCursor', 'sizeHorCursor', 'sizeVerCursor', 'splitHCursor', 'splitVCursor', 'startDragDistance', 'startDragTime', 'startTimer', 'startingUp', 'style', 'syncX', 'timerEvent', 'topLevelWidgets', 'tr', 'trUtf8', 'translate', 'tryLock', 'type', 'unlock', 'upArrowCursor', 'waitCursor', 'wakeUpGuiThread', 'whatsThisCursor', 'wheelScrollLines', 'white', 'widgetAt', 'yellow']
                  >>>

                  I'm working on Mandriva2006 with Salome V3.2.2 and I use the environment created by the Salome Wizard (env_products.sh). I just updated my environment variables for the DATA module (DATA_ROOT_DIR, DATA_SRC_DIR, PATH, PYTHONPATH).

                  Gilles
                  • Re: Nouvelle interface SWIG et module Python

                    Posted by Vadim SANDLER at November 07. 2006
                    Hello Gilles,

                    OK. It seems to be well-known problem with incompatibility of PyQt binaries and Qt installed on the computer. We encountered such kind of problem on other platforms and fixed it for Mandrake 10.1 and RedHat 8.0.
                    The problem is that the list of available Qt classes is statically created at the time of PyQt compilation and in the runtime the lookup of Python wrapper classed is performed according to this static list. And if then PyQt used does not correspond to the Qt for each it was compiled - this causes problems with classes lookup in Python.

                    To solve this problem quickly you can now try to install PyQt in the "binaries" mode - use SALOME Installation Wizard for this. I just tried to do it and after installation of the PyQt binaries the problem has been solved.

                    Regards,
                    Vadim.
                    • Re: Nouvelle interface SWIG et module Python

                      Posted by DAVID Gilles at November 07. 2006
                      Yes ! Thank you very much Vadim !
                      It works now !
                      Again, thany you !

                      Gilles, a happy Salome developper
Powered by Ploneboard
Document Actions