"import random" doesn't autocomplete in Python Editor (but it works)

python

#1

Just so you know.
I find the autocomplete handy and when it doesn’t show up it gives the impression that it doesn’t work :wink:


(Pascal Golay) #2

Hi Jorgen - yeah, I see that…
Hmm - looks like it is built in - you can use it without the import statement.

thanks,

-Pascal


#3

Oh, now that sounds like a smart move!
Thanks!


(Steve Baer) #4

That doesn’t sound right


#5

…put it on the wish list please :slight_smile:

Can it be that Pascal just removed the “import random” from his test and ran the script and therefore it was already loaded in memory?


(Steve Baer) #6

Sorry, but absolutely no. Auto importing behind your back is going to cause unexpected behavior. I have no problem adding random to the autocomplete list.

I think that may be the case


#7

I’ll buy that statement in a heartbeat! And would be a fool to argue against (for too many reasons to list here) :smiley:

Thanks!


(Steve Baer) #8

Added to the wishlist at
https://mcneel.myjetbrains.com/youtrack/issue/RH-42934


#9

Hi guys, it seems like “import random” still doesn’t autocomplete, and I see that the youtrack is quite odd, since it does not state “Random” but rather “Import”… :slight_smile: (Take a look at the link above)

Thanks


(Steve Baer) #10

I won’t be working on this for V6. It might be done during V7 development.


#11

OK. I know that it works so I’m good either way :slight_smile:
It just surprised me that it didn’t autocomplete so I went to check the status and then i noticed that the topic was a bit odd so I thought I should let you know. That’s all.