#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    105
    Rep Power
    10

    WxPython in Eclipse (PyDev)


    Not entirely sure I should be asking this here so feel free to bite my head off if this is a faux pas.

    But basically I'm using PyDev in Eclipse and recently installed the wxPython libraries - it imports fine using IDLE, etc, and when I run a Python program using wxPython it runs fine - but one little thing really bugs me. For some reason, despite making sure that wx and wxPython are in the 'Forced Builtins' section of the PyDev preferences, PyDev refuses to recognise any of the things I do with wx:
    Code:
    Undefined variable from import: Frame
    And the like are the messages - all I see is little X's and squiggly red underlines, so you can imagine how irritating this is.

    Has anyone encountered this problem with PyDev & wxPython before, and/or know how to fix it? Last time I had the problem, it was due to the Forced Builtins not being properly set up but I can't see how that is the problem this time.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0
    I'm having exactly the same problem. Can't anybody help? It's kinda hard without auto completion etc.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Work around


    Hi there
    I ran into the same problem and found a way around it. Not entirely sure this is the most clean way of doing things but it works.

    In your Eclipse preferences, navigate to the Interpreter - Python settings. Remove Python interpreters and all the System PYTHONPATH settings.

    Then re-add the Python interpreter and Eclipse will detect and add the PYTHONPATHs and the WX packages

    Hello auto-completion!

    Hope this helps

    ATeamDev
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Thumbs up


    Originally Posted by ATeamDev
    Hi there
    I ran into the same problem and found a way around it. Not entirely sure this is the most clean way of doing things but it works.

    In your Eclipse preferences, navigate to the Interpreter - Python settings. Remove Python interpreters and all the System PYTHONPATH settings.

    Then re-add the Python interpreter and Eclipse will detect and add the PYTHONPATHs and the WX packages

    Hello auto-completion!

    Hope this helps

    ATeamDev
    Thanks a lot to you. Now it works like a charm without any X marks in the code which irritates even though program works. I went to Window>Preferences and Removed python Interpreter and added the Python Interpreter again. That Worked.
    You are Awesome

IMN logo majestic logo threadwatch logo seochat tools logo