Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Why does this happen?</strong>: PyDev has no support for parsing the PyObjC scripting bridge metadata, and therefore has no way of introspecting / extracting symbols for many of the PyObjC classes.</p> <p><strong>What to do to fix it</strong>: In the PyDev <a href="https://github.com/aptana/Pydev" rel="nofollow">source code</a> there are several Python scripts which handle discovery of this metadata. The scripts are executed by Eclipse using the configured interpreter, and they return strings which are used to configure the interpreter, fill in completion lists, show usage tips, etc.</p> <p>The scripts which seem relevant to your needs are:</p> <ul> <li><a href="https://github.com/aptana/Pydev/blob/master/plugins/org.python.pydev/PySrc/interpreterInfo.py" rel="nofollow">interpreterInfo.py</a> - called to obtain the list of directories and other default top-level imports for a given interpreter.</li> <li><a href="https://github.com/aptana/Pydev/blob/master/plugins/org.python.pydev/PySrc/importsTipper.py" rel="nofollow">importsTipper.py</a> - generates usage tips for a given symbol.</li> <li><a href="https://github.com/aptana/Pydev/blob/master/plugins/org.python.pydev/PySrc/pycompletion.py" rel="nofollow">pycompletion.py</a> - generates a list of completions for a given symbol.</li> </ul> <p>Examples of calls to the above scripts using the system interpreter:</p> <pre><code>% /usr/bin/python interpreterInfo.py | grep PyObjC |/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjCINS_PATH </code></pre> <p>Generate completions for a module:</p> <pre><code>&gt;&gt;&gt; import pycompletion &gt;&gt;&gt; print pycompletion.GetImports('os') @@COMPLETIONS(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/os.py,(EX_CANTCREAT, 3),(EX_CONFIG, 3),(EX_DATAERR, 3), .... </code></pre> <p>It seems possible to create a simple <code>macobjc.py</code> library with routines which detect and read the PyObjC.bridgesupport file(s). The PyDev scripts could be modified to call into this library in order to return the list of valid completions for those classes. You'll need to point Eclipse to a local copy of the PyDev source in order to develop and test your patches against these files. Once you're done you can send it upstream; I have to believe the PyDev folks would accept a well-written patch to support PyObjC completions.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload