|
| 1 | +## Visual Studio on Windows |
| 2 | + |
| 3 | +Follow the installation instructions for [Python Tools for Visual Studio](https://pytools.codeplex.com/wikipage?title=PTVS%20Installation) |
| 4 | + |
| 5 | +You can either start by creating your own project for working with the Exercism problems or you can download a Visual Studio solution that is already set up. |
| 6 | + |
| 7 | +### Exercism.io Visual Studio Template |
| 8 | + |
| 9 | +This is a Visual Studio template that comes pre-configured to work on the problems in as many languages as Visual Studio supports. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +1. Download the [Exercism.io Visual Studio Template](https://github.com/rprouse/Exercism.VisualStudio) from GitHub by clicking the Download Zip button on the page. |
| 14 | +2. Unzip the template into your exercises directory, for example `C:\src\exercises` |
| 15 | +2. Install the [Exercism CLI](http://help.exercism.io/installing-the-cli.html) |
| 16 | +3. Open a command prompt to your exercise directory |
| 17 | +4. Add your API key to exercism `exercism configure --key=YOUR_API_KEY` |
| 18 | +5. Configure your source directory in exercism `exercism configure --dir=C:\src\exercises` |
| 19 | +6. [Fetch your first exercise](http://help.exercism.io/fetching-exercises.html) `exercism fetch python` |
| 20 | +7. Open the Exercism solution in Visual Studio |
| 21 | +8. Expand the Exercism.python project |
| 22 | +9. Click on **Show All Files** in Solution Explorer (See below) |
| 23 | +10. The exercise you just fetched will appear greyed out. Right click on the folder and **Include In Project** |
| 24 | +11. Get coding... |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +To run the tests, you can do so at the command line, or within Visual Studio. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +## Code Style and Linting |
| 33 | + |
| 34 | +There's a style guide called [PEP8](http://legacy.python.org/dev/peps/pep-0008/) that many Python projects adhere to. |
| 35 | +Read it when you get a chance! |
| 36 | + |
| 37 | +If you just want a quick overview of some problems in your code, use [pylint](http://www.pylint.org/)! |
| 38 | +It can be pretty picky though, so take its results with a grain of salt. |
| 39 | +If you don't agree with one of its points, that's a good topic for a discussion in the comments for your program! |
| 40 | + |
| 41 | +If you'd rather have a tool take care of your style issues, take a look at [autopep8](https://github.com/hhatto/autopep8)! |
| 42 | +Run `autopep8 -d mycode.py` to get a diff of the changes it proposes and `autopep8 -i mycode.py` to format the code inplace! |
0 commit comments