Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
618 views
in Technique[技术] by (71.8m points)

python - How to see variables denoted by Greek letters in viscode's interactive window?

I'm currently using Python3.73 on VSCode. I execute the code on interactive window with Jupiter notebook. The problems are:

  1. I can't type Greek letters in notebook cells while I can type them in editor using LaTeX syntax;
  2. Even if I copy a Greek letter from somewhere else and paste it in a cell in interactive window and denote it as the name of a variable, I can't find this variable in the interactive data viewer. But I'm sure it's stored somewhere because I can still call it again.

e.g. example code , but the eigenvalues can't be seen after clicking the "Show variable in data viewer button"

So how can I type Greek letters in interactive cells directly? and how can I see variables denoted by Greek letters?

question from:https://stackoverflow.com/questions/65545847/how-to-see-variables-denoted-by-greek-letters-in-viscodes-interactive-window

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

how can I type Greek letters in interactive cells directly?

Jupyter Notebook can recognize Greek letters, after typing alpha, pressing Tab, you'll get α, which you can try in JupyterLab. But it's not achievable in VS Code.

Although Greek letters' English name are stored in Jupyter in VS Code, but it couldn't be turned into α automatically in VS Code. Furthermore, to Tab Complete Greek Letters, the production group vscode-jupyter does't have plans on adding this functionality at this time.

how can I see variables denoted by Greek letters?

The default encoding format is UTF-8. Not only Greek, but also Cyllic and other non-english language can't be shown in Variables Viewer. So there's no way to do that.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...