Tips and Tricks for Working with Spyder
Spyder is a really good IDE, lots of power. But like all powerful IDEs it is so automatic that it can also be confusing. If you read the whole manual it would take more time than you pobably want to spend. Here are some tips ( if you have a question, ask User:Russ_hensel he will get the answer if he can )
The console is where you see the results of running your code. Sometimes it gets junked up with output. It can also remember old code in a way that messes up what you are trying to run. For me the best way to clean this up is to delete the console and make a new one. How:
- Find the console. The console is labeled on a tab something like "Python 3" ( the number may vary )
- Click on the x on the console tab. Boom it is gone.
- Open a new console:
- Where the console was, but below the tab area right click.
- Select open a Python console
- Wait a bit ( seconds ), a couple of lines will run in the console to set it up.
- Next time you run code an extra click or so on the console and the code ( not always necessary ) will resole the error "No Python Console"
After you run your code the console still "remembers" much of what happens. Imports for example still hang around. This can be very useful for debugging. However, from time to time to clean up close the console ( see above ) and create a new one.
Starting New Files
When I use the menu to create a new file I am not always sure where it will go. So normally I go the file explorer.
- Find the directory where you want the file.
- Right click
- Select New -> File
- Type the file name, use .py if you want a python file.
Other Tips on Python
We have more in the area of tips, look at the following: