0

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?

2
  • What is exactly the extension implementing this feature ? I would expect Pylance, but don't have it. Commented Nov 7, 2024 at 10:42
  • @paulduf The python interactive window is part of the Jupyter extension. Commented Nov 25, 2024 at 13:26

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.