Menu

Setting up completion on Pydev

2008-11-09
2013-03-15
  • Simon Clarke

    Simon Clarke - 2008-11-09

    Hello,

    I've previoulsy been writing in Jscript and have recently picked up Python. The main area for my coding is in Softimage XSI where Python ( and JScript ) are used as scripting languages.

    When writing previously in JScript a colleague of the time had imported all the methods, properties, objects and so on into the editor we used, so that we had auto completion and syntax checking that worked with the XSI-JScript architecture. I can't remeber the details but think he did this by way of a text or XML file that told the editor what wa what.

    I'd like to do the same thing with PyDev so i can write my Python scripts with the same functionality, but can't seem to figure out how it's done.....

    .....Help!!!

    Thanks

    //Simon

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2008-11-10

      There are plans to add such a support for pydev, but currently there's none... You could instead of the XML files create .py files with the structure you have from XSI and have code-completion work on that (so, you'd create stub python modules with the structure from XSI)

      If you already have that info in XML, it should be easy converting it to a python structure... If you need help on how to that, please reply giving info on how's your XML structured (and maybe giving a sample of it)....

      On a second thought, maybe it'd be better creating a bug request with that (http://pydev.sourceforge.net/faq.html#how_do_i_report_a_bug) and attach what you have as an example (sourceforge forums are not really the best place for pasting/attaching things)

      Cheers,

      Fabio

       
    • Simon Clarke

      Simon Clarke - 2008-11-11

      Hello,

      Thank you so much for the reply, much appreciated. I don't have an XML file, as far as I remember my colleague went through the XSI SDK documentation and got a list of methods, properties, objects and so on, and built one, so I would have to do the same.

      I think that the way to go will be to create .py files - though I'm not up to speed quite yet so if you could please just point in the right direction I can plough through the docs and work it out. I assume this is about making a template unless auto completion is a bit different..?

      Thanks once again

      //Simon

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2008-11-16

        There's no real documentation about that yet, but the idea would be creating a directory structure with python files for the signatures you want and then later adding that folder as if it was an external source folder in the project you want those completions to appear (or maybe create only a zip to make it easy to distribute it).

        Cheers,

        Fabio