Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the spyder shortcut key and the symbolic output mode of python

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, I would like to share with you spyder shortcuts and python symbolized output mode is what the relevant knowledge, detailed content, clear logic, I believe that most people still know too much about this knowledge, so share this article for your reference, I hope you can learn something after reading this article, let's take a look at it.

Spyder Shortcut and python symbolized output spyder Shortcut

1. F5 executes the current file

2. F9 executes the selected part

3. Tab preloads the variable name starting with this letter.

For example, if you define the variable mypy1 mypy2 mypy3 before, and then you want to use mypy1, (of course, the variable name here is shorter), you just type an m and then Tab, and the variable that starts with m is automatically loaded.

4. Contents of Ctrl+Enter execution unit (cell)

A cell is defined as starting with #% and ending with #%

5. Shift+Enter executes the contents of each cell from the current cursor in turn

6. Alt+ up / down arrow keys move the line up / down

7. The Ctrl+ left mouse button displays the definition of the specified function or method

8. Shift+Ctrl+Alt+M maximize or restore the current form

9. Ctrl+Shift+F search

10. Ctrl+'+'/'-' increases or decreases fonts

(MacOS is Cmd+'+'/'-'). Of course, you can also customize the font size in prefenrenses.

11. Ctrl+S saves the current file

(Cmd+S in MacOS), and force the triangle warning on the left side of the editor to be updated (indicating that I don't understand much here, but this command doesn't seem to be very important)

12. In Ipython, this shortcut will save the current thing in HTML format, including all configurations.

Ctrl+I (Cmd+I in MacOS) displays help information for objects

Console operation

1. You can type the function name and variable name to view the output and value

2. Type dir () to view the namespace

3. Type% reset to reset the namespace, followed by a pop-up confirmation box, enter y to reset the namespace,% reset-f is enforced without confirmation

4. You can use help (name) (name is the object that exists in the namespace) to view the information of the object (the object here is object does not know what to refer to)

5. When modifying part of the code for debugging, you can select the modified code and press F9 to work (the modified part will replace the original part in console) without having to re-execute the code, which is used for debugging when the project is relatively large. You can reuse the data and objects defined in console. After pressing F9, you can use other editors to view the file and find that the code in the file has not changed. From this you can guess that console actually executes a replica area of the code.

Python symbolized output

(output in LaTex format, the module used is sympy)

From _ _ future__ import divisionfrom sympy import * x, y, z, t = symbols ('x y z t') k, m, n = symbols ('k m n', integer=True) f, g, h = symbols ('f g h', cls=Function)

With the above definition, we can:

Type:

Expr= (Xeroy) * * 3expr

Output:

(X + y) * * 3

Type:

Expr.expand ()

Output:

Xbox 3 + 3*x**2*y + 3*x*y**2 + YBG 3

Spyder common shortcuts below for Spyder very commonly used shortcut key functions Ctrl+1 comments / uncomment Ctrl+4 block comments Ctrl+5 uncomment F5 running program Ctrl+I to view a function's help documentation Ctrl+L jump to the line number Ctrl+P file switch Ctrl+R replacement text Ctrl+Shift+V call up variables window above is the "spyder shortcut keys and python symbolization output mode is what" all the contents of this article, thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report