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



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.




Oh, now that sounds like a smart move!

(Steve Baer) #4

That doesn’t sound right


…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


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


(Steve Baer) #8

Added to the wishlist at


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)


(Steve Baer) #10

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


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.