Projects#
Spyder allows you to associate a given directory with a Project, which automatically saves and restores the files you have open in the Editor from the last time you opened that project. With the Project pane, you can browse all your project’s files, regardless of your current working directory or Files location.
In addition, your project’s root folder is used to set your working directory, and automatically added to the PYTHONPATH
, so you can easily import
and work with any modules and packages you create inside of it.
Note
Projects are completely optional and not imposed on users. All of Spyder’ functionality (code completion, session saving, File Explorer, working directory, etc) is available without creating a Project.
Creating a Project#
To create a Project, click the New Project entry in the Projects menu, choose whether you’d like to associate a Project with an existing directory or make a new one, and enter the Project’s name and path.
Using the Projects Pane#
Once a Project is opened, the Project pane is shown, presenting a tree view of the current Project’s files and directories. It allows you to perform all the same operations as Spyder’s Files pane.
Working with version control#
The Project pane has basic integration with the Git distributed version control system, just like in the Files pane. You can commit or browse a file, directory or the entire repository via the commands in the context menu.
To use this functionality, the Project must be located in a git
repository and the git
and gitk
commands must be on the system path.