Richard
Richard

Reputation: 847

How to enable the pathlib.Path autocompletion in VSCode editor?

I have noticed a beautiful new feature in the python interactive window when using pathlib.Path objects:

screenshot showing code cwd = Path.cwd() and autocompletion in the next line when typing cwd / ""

Intellisense actually shows the content of the directory when typing a slash behind a folder Path. This is awesome! I would like to take advantage of this feature in the file editor too. Is there a way to activate it, or is this only possible in the interactive window's context?

Upvotes: 0

Views: 535

Answers (1)

MingJie-MSFT
MingJie-MSFT

Reputation: 9209

This seems to be a requirement for new functions.There is no way to get prompt in.py file at present.I submitted it in GitHub and look forward to their reply.

Of course, you can also try to use jupyter notebook to write code, which is the same as the interactive window:

enter image description here

Upvotes: 1

Related Questions