pydev code completion for python extensions

Kannan
2008-04-30
2013-03-15
  • Kannan

    Kannan - 2008-04-30

    I am not able to get code completion for binary python extensions (built with boost python) on Windows platform. I have added them to the project's PYTHONPATH. Do I need to do anything special to get it to work?

    Platform: WinXP.
    Eclipse version: 3.3.2
    PyDev Extensions: 1.3.15

    --Kannan.

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2008-04-30

      You mean the completions that are context-insensitive (those are currently only supported for things available in the static analysis) or any completion from the dll (if you do an import and use it does it work?)

      Cheers,

      Fabio

       
      • Kannan

        Kannan - 2008-04-30

        I mean the completions from the DLL that I import in the script. Is this supposed to work?

        --Kannan.

         
        • Fabio Zadrozny

          Fabio Zadrozny - 2008-04-30

          Yes, it's supposed to work... if you go in the prompt and do "import mydll; print dir(mydll)", does it bring the tokens correctly?

          Also, note that it'll get those completions and cache it, if you want to rebuild them you have to do: Ctrl+2 kill<Enter>

          Cheers,

          Fabio

           
          • Kannan

            Kannan - 2008-04-30

            It doesn't work. I think these DLLs were not resolved.

            I added these DLLs to the External Source Folders list (with the "Add zip/jar/egg" option) in "Pydev - PYTHONPATH" project setting. These DLLs have external native DLL dependencies which I have set in my PATH. Do I need to do anything else?

            --Kannan.

             
            • Fabio Zadrozny

              Fabio Zadrozny - 2008-04-30

              If you open a command shell (cmd.exe), does it work there? Also, after setting the PATH environment variable, you have to restart eclipse -- and any open shell if you start eclipse from a shell for it to get the new PATH.

              Cheers,

              Fabio

               
              • Kannan

                Kannan - 2008-04-30

                yes, it does work from the command line. i launched eclipse.exe from the same command line. I set the "PyDev - PYTHONPATH" to be the same as what I had in the command line environment (external source directories option). I still see the libraries as unresolved import.

                --Kannan.

                 
                • Fabio Zadrozny

                  Fabio Zadrozny - 2008-04-30

                  Do you have some error in your error log? Also, are you able to get completion on other builtins? (E.g.: in an empty file, requesting a completion brings RuntimeError, AssertionError, etc?)

                   
                  • Kannan

                    Kannan - 2008-05-01

                    I think I figured it out. It was a problem with one of the dependent dlls. Thanks a lot for the help.

                    However, how do I look at the error log in eclipse.

                    --Kannan.

                     
            • Fabio Zadrozny

              Fabio Zadrozny - 2008-04-30

              Actually, I just realized one thing... you're adding a DLL and not a zip file, so, you should actually add the folder that contains the DLL in your pythonpath, and not the DLL itself...

              Cheers,

              Fabio

               

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks