srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

add quick python select/switch function #305

Closed XIVN1987 closed 4 years ago

XIVN1987 commented 4 years ago

Add quick python select/switch function.

And when a python file is opened or activated, the python interpreter used by JEDI will show on statusbar.

srusskih commented 4 years ago

Greate idea! Thanks!

srusskih commented 4 years ago

I was wondering if I start using system default python and then would like to switch to another one, how many "sub processes" I would have? I think at least two. Should we "stop" them somehow in this case? How can we do this?

XIVN1987 commented 4 years ago

I was wondering if I start using system default python and then would like to switch to another one, how many "sub processes" I would have? I think at least two. Should we "stop" them somehow in this case? How can we do this?

This problem is too hard for me. I just only modify 'python_interpreter', no anything else. And the real python switch action is complete by SublimeJEDI. And I'm not able to understand how the python switch is done. So I cannot answer your question.

XIVN1987 commented 4 years ago

I was wondering if I start using system default python and then would like to switch to another one, how many "sub processes" I would have? I think at least two. Should we "stop" them somehow in this case? How can we do this?

I find that after 'python_interpreter' is modified, the python used by SublimeJEDI is not changed immediately. It is only changed after sublime restart. I will try to make the switch take effect immediately.

XIVN1987 commented 4 years ago

Now, py switch can take effect immediately after 'python_interpreter' changed. I Implement this by directly cleaning up 'daemon.DAEMONS'. So that a new daemon will be generated when a new request coming.

XIVN1987 commented 4 years ago

Imperfection of implementation