-
Notifications
You must be signed in to change notification settings - Fork 19
Setting Up Project in Visual Studio 2017
Follow these steps if wanting to use VS17 as your IDE - the following options will:
- Place your project in same location as your local GIT clone
- Properly display python project tree in VS Solution Explorer
- Allow execution of the project using built-in VS functions (hitting "Start" button runs "Python main.py")
- Show how to alter script arguments through VS (will run "Python main.py north" through these settings)
-
Clone Repo to local [directory = "ExistingPythonCodeDirectory"]
-
(Within VS) File -> New Project [FromExistingPythonCode = True] [Name = "MyProjectName"] [Location = "ExistingPythonCodeDirectory"] [CreateNewSolution = True] [SolutionName = "MySolutionName"] [CreateDirectory = False] [CreateGITRepo = False] -> Next (Wizard Pops Up)
-
(Within Project from Existing Python Code Wizard) [directory = "ExistingPythonCodeDirectory"] [filter = default] [SearchPaths = "ExistingPythonCodeDirectory\chinesepostman, ExistingPythonCodeDirectory\data, ExistingPythonCodeDirectory\tests] -> Next
-
[PythonInterpreter = Default] [FileToRunWhenF5 = "main.py"] -> Next
-
[SaveProjectLocation = "MyDesiredProjectLocation"] [DetectVirtualEnvironments = True] [CustomizeProjectType = False] ->Finish
-
(Within VS) File -> Open -> Project/Solution -> [project= "ExistingPythonCodeDirectory""MyProjectName" + ".pyproj"]
-
(Within VS Solution Explorer) RightClick Project "MyProjectName" -> Properties [ScriptArguments = "north"] -> Save
-
(Within VS Solution Explorer) LeftClick Project "MyProjectName" -> F5 (OR StartButton from top toolbar)
-- You should have successfully ran the project for the first time.. Congrats!