Menu

autocompletion problem with file objects

2011-05-06
2013-03-15
  • Gabriel M. Elder

    I recently uninstalled, then reinstalled / updated my eclipse and pydev installation to helios and the latest pydev on macosx v10.5.8. I also downloaded and installed macpython v2.5.1, since that matches the version that ships with the OS, and from a previous post, that seemed to be the best way to get the .py files I needed to autoconfig / set and use a python interpreter.

    Now, since I've re-imported my projects into the eclipse workspace, I've run into a problem where, if I do something like:
            f = open(sys.argv)   # or any other file path-name
            raw_data = f.read()

    it doesn't start the auto-completion at "f." while typing the second line. What's weird is that, of my existing projects that I've re-imported, the file object method call auto-completion does work in at least one module in a different project, but not in the project file that I'm currently working on. So, there is an inconsistency there. This may not be relevant, but when I test this out in PyCrust, the auto-completion works fine there. So it seems that introspection of the __builtins__ is working fine, generally speaking.

    As a further test, I created a new pydev project to see if this happens for new projects and source files, and the problem does occur in that circumstance as well. I've also verified that the pydev perspective is selected when the problem occurs.

    Looking at the various properties and settings for the projects, there doesn't seem to be anything that stands out configuration-wise that would seem to account for this behavior.

    Any ideas? Bug?

    - gabriel

     
  • Gabriel M. Elder

    Amend the problem for the existing project and file where the auto-completion seemed to be working. The auto-completion only works when I try to invoke methods via the existing file object / variable name that has always been there. But if I create a new one, assign to it from an open(), and then try to invoke methods via auto-completion, the same problem occurs.

    Auto-completion for other modules explicitly imported (versus the builtin file object) seems OK, so far…

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.