Spyder IDE

From PharmWiki
Jump to navigation Jump to search

Opening Spyder

  1. Open Anaconda
    1. If you did it correctly, it will look like: Comp001.pngClick to enlarge
  2. Switch to the PHRM_8010-Python
    1. The top should look like Comp002.png
    2. The whole screen should look like: Comp003.pngClick to enlarge
  3. Click Comp004 .pngthat is under Comp005.pngClick to enlarge
  4. You should see the following screen. Unlabeled looks like this: Comp007.png Click to enlarge. I labelled it, so that it is easier to talk about: Comp009.png
    1. Command Bar (top): This is at the top and has pulldowns and commands that you might use.
    2. Toolbar (second from top): This has icons to do various commands. On the far right is the location of the project.
    3. Project and Files Explorer (left pane): This is located on the left side. It shows the project directory and the files associated with it.
    4. Individual Files Explorer (middle pane): The middle pane shows you the individual files that are in the project that are separated by a tab. To put a file in there, double click a file from the Project and Files Explorer.
    5. Output Explorer (upper right pane): The pane is located on the upper right. There are tabs for help, plots, variable explorer and files.
    6. Console/History (lower right pane): The pane is located on the lower right. There are a tab for the console, which is the text output for the Python language and Python history.

Toolbar

Comp012.png

Commonly Used Toolbar Icons
Icon Command Menu Command Shortcut Description
Comp013.png
New File File ⇒ New File ... Windows: Control-N

MacOS: Command-N

This produces a new text file. You need to change the last two characters to py to make a Python language file. For

example, newfile.txt ⇒ newfile.py

Comp014.png
Open File File ⇒ Open ... Windows: Control-O

MacOS: Command-O

This command will open a text or a Python language file.
Comp015.png
Save File File ⇒ Save Windows: Control-S

MacOS: Command-S

This command will save the file that is the front of the Individual Files Explorer pane of Spyder. The icon will
Comp017.png
be grayed out when all files are saved.
Comp016.png
Save All Files File ⇒ Save all Windows: Control-Alt-S

MacOS: Command-Option-S

This command will save all the files in the Individual Files Explorer pane of Spyder. The icon will be grayed out

when all files are saved.Comp018.png

Comp019.png
Run File Run ⇒ Run Windows: F5

MacOS: F5

Run the file that is in the front of the Individual file Explorer pane of the Syder program

Output Explorer

Commonly Used Output Explorer Icons
Icon Command Location Description
Comp033.png
Remove All Variables Variable Explorer Variables get listed her as programs are run. However, it can get very cluttered. Therefore, sometimes you need to delete variables.

Other Important Icons

Other Important Icons
Icon Location in Spyder Meaning
Comp020.png
Individual File Explorer This icon means that there is an error on the line of the program. If you hover over it, the error will appear
Comp021.png
Individual File Explorer This icon means that it is a warning. This will occur if a Python language module, which you will get familiar with later,

or a variable is not used in the Python language program.