Python Editor Autocomplete / Intellisense Still Not Working

Is Autocomplete / Intellisense still not working in the Python Editor at times?? I have seen issues at least back to 2014. Is this still a bug?

I noticed in my scenario it definitely has to do with the from statement.

Reproduction Steps:

In zzzTest:

  1. Change the path of on the ‘sys.path.append’ line to the folder where you saved the zzzCommonScripts file.
  2. On line 6 type ‘rs.’ and you will see Autocomplete works and brings up the rhinoscriptsyntax Intellisense.
  3. Uncomment line 3.
  4. Do step 2 again. now Autocomplete does NOT work.

Obviously this has something to do with the from command interfering with Intellisense. Can this be fixed??

zzzCommonScripts.py (278 Bytes)
zzzTest.py (142 Bytes)

Hi Mike,

We are working on a new version for Rhino 8 that will be much better.

In the meantime for this particular case if you replace:

import sys
sys.path.append(r"\\Mac\Home\Downloads") 

with

import sys as s
s.path.append(r"\\Mac\Home\Downloads") 

it should work.
In general you’ll get better results using import ... as instead of just import ... or from ... import *.

Hope that helps.

1 Like

@Alain - Just tried using the alias as you suggested. This does not work on my machine. I’m on Windows 10 rather than a Mac. I know that shouldn’t matter but maybe it does.

The issue is in the from line. If I comment the from line out then all of a sudden Intellisense works. If I uncomment it, it doesn’t work.

Any ideas how to band-aid this in the meantime?

You’re right.
I just noticed that you have to run the script once and then the completions for rs. will work.

@Alain - I’ve developed a lot of software over the years and that’s great you noticed Intellisense works after running the script once. That works for me as far as a temporary fix. What a funky bug. Thanks for letting me know about the band-aid!