Skip to content

Write the Docs - Updates for Block 22 #5713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/python/publish-to-app-service-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The publishing process differs between Visual Studio 2017 and later and Visual S

For this walkthrough, you need a web app project based on the Bottle, Flask, or Django frameworks. If you don't yet have a project and would like to try the publishing process, create a simple test project as follows:

1. In Visual Studio, select **File > New > Project**, search for "Bottle", select the **Bottle Web Project**, specify and name and a path for the project, click **OK**. (The Bottle template is included with the Python development workload; see [Installation](installing-python-support-in-visual-studio.md).)
1. In Visual Studio, select **File > New > Project**, search for "Bottle", select the **Bottle Web Project**, specify and name and a path for the project, select **OK**. (The Bottle template is included with the Python development workload; see [Installation](installing-python-support-in-visual-studio.md).)

1. Follow the prompts to install external packages, selecting **Install into a virtual environment** and your preferred base interpreter for the virtual environment. You typically match this choice with the version of Python installed on App Service.

Expand Down Expand Up @@ -74,7 +74,7 @@ If desired, you can also install the `bottle` package using the process in those

Publishing to Azure App Service from Visual Studio 2017 and later copies only the files in your project to the server. It's necessary, therefore, to create the necessary files to configure the server environment.

1. In Visual Studio **Solution Explorer**, right-click the project and select **Add > New Item...**. In the dialog that appears, selecting the "Azure web.config (Fast CGI)" template and select OK. This creates a `web.config` file in your project root.
1. In Visual Studio **Solution Explorer**, select and hold (or right-click) the project and select **Add > New Item...**. In the dialog that appears, selecting the "Azure web.config (Fast CGI)" template and select OK. This creates a `web.config` file in your project root.

1. Modify the `PythonHandler` entry in `web.config` so that the path matches the Python installation on the server (see [IIS Configuration Reference](https://www.iis.net/configreference) (iis.net) for exact details). For example, for Python 3.6.1 x64 the entry should appear as follows:

Expand Down Expand Up @@ -128,9 +128,9 @@ Publishing to Azure App Service from Visual Studio 2017 and later copies only th

Note that when the array is empty, Django automatically allows 'localhost', but adding your production URL removes that capabilities. For this reason you might want to maintain separate development and production copies of `settings.py`, or use environment variables to control the run time values.

1. In **Solution Explorer**, expand the folder named the same as your project, right-click the `static` folder, select **Add > New Item...**, select the "Azure static files web.config" template, and select **OK**. This action creates another `web.config` in the `static` folder that disables Python processing for that folder. This configuration sends requests for static files to the default web server rather than using the Python application.
1. In **Solution Explorer**, expand the folder named the same as your project, select and hold (or right-click) the `static` folder, select **Add > New Item...**, select the "Azure static files web.config" template, and select **OK**. This action creates another `web.config` in the `static` folder that disables Python processing for that folder. This configuration sends requests for static files to the default web server rather than using the Python application.

1. Save your project, then in Visual Studio **Solution Explorer**, right-click the project and select **Publish**.
1. Save your project, then in Visual Studio **Solution Explorer**, select and hold (or right-click) the project and select **Publish**.

![Publish command on a project's context menu](media/template-web-publish-command.png)

Expand Down Expand Up @@ -180,7 +180,7 @@ Publishing to Azure App Service from Visual Studio 2017 and later copies only th
> [!Note]
> A short video of this process can be found on [Visual Studio Python Tutorial: Building a Website](https://www.youtube.com/watch?v=FJx5mutt1uk&list=PLReL099Y5nRdLgGAdrb_YeTdEnd23s6Ff&index=6) (youtube.com, 3m10s).

1. In **Solution Explorer**, right-click the project select **Publish**.
1. In **Solution Explorer**, select and hold (or right-click) the project select **Publish**.

1. In the **Publish** dialog, select **Microsoft Azure App Service**:

Expand Down
2 changes: 1 addition & 1 deletion docs/python/python-interactive-repl-in-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Entering `dir()` in a scope displays valid identifiers in that scope, including

## Send to Interactive command

In addition to working within the **Interactive** window directly, you can select code in the editor, right-click, and choose **Send to Interactive** or press **Ctrl**+**Enter**.
In addition to working within the **Interactive** window directly, you can select code in the editor, select and hold (or right-click), and choose **Send to Interactive** or press **Ctrl**+**Enter**.

![Send to interactive menu command](media/interactive-send-to.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/python/python-web-application-project-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Microsoft Azure Cloud Services *does* support the *requirements.txt* file. See [

## Debugging

When a web project is started for debugging, Visual Studio starts a local web server on a random port and opens your default browser to that address and port. To specify additional options, right-click the project, select **Properties**, and select the **Web Launcher** tab:
When a web project is started for debugging, Visual Studio starts a local web server on a random port and opens your default browser to that address and port. To specify additional options, select and hold (or right-click) the project, select **Properties**, and select the **Web Launcher** tab:

![Web launcher properties for the generic web template](media/template-web-launcher-properties.png)

Expand Down
6 changes: 3 additions & 3 deletions docs/python/quickstart-05-python-visual-studio-open-folder.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Once you've [installed Python support in Visual Studio 2019](installing-python-s

![A view of hidden folders in Solution Explorer](media/quickstart-open-folder/05-view-hidden-folders.png)

1. To run the code, you first need to identify the startup or primary program file. In the example shown here, the startup file *contemplate-koans.py*. Right-click that file and select **Set as Startup Item**.
1. To run the code, you first need to identify the startup or primary program file. In the example shown here, the startup file *contemplate-koans.py*. Select and hold (or right-click) that file and select **Set as Startup Item**.

![Setting a startup item in Solution Explorer](media/quickstart-open-folder/06-set-as-startup-item-command.png)

Expand All @@ -63,7 +63,7 @@ By default, Visual Studio runs a Python project opened as a folder in the root o

In such cases, you must also add a line to the launch configuration JSON file to specify the working directory:

1. Right-click the Python (*.py*) startup file in **Solution Explorer** and select **Debug and Launch Settings**.
1. Select and hold (or right-click) the Python (*.py*) startup file in **Solution Explorer** and select **Debug and Launch Settings**.

![The Debug and Launch Settings command for a Python file](media/quickstart-open-folder/09-debug-launch-settings-menu-command.png)

Expand All @@ -72,7 +72,7 @@ In such cases, you must also add a line to the launch configuration JSON file to
![The Debug and Launch Settings command for a Python file](media/quickstart-open-folder/10-select-debugger.png)

> [!Note]
> If you don't see **Default** as a choice, be sure that you right-clicked a Python *.py* file when selecting the **Debug and Launch Settings** command. Visual Studio uses the file type to determine while debugger options to display.
> If you don't see **Default** as a choice, be sure that you chose a Python *.py* file when selecting the **Debug and Launch Settings** command. Visual Studio uses the file type to determine which debugger options to display.

1. Visual Studio opens a file named *launch.vs.json*, which is located in the hidden *.vs* folder. This file describes the debugging context for the project. To specify a working directory, add a value for `"workingDirectory"`, as in `"workingDirectory": "python3"` for python-koans example:

Expand Down
4 changes: 2 additions & 2 deletions docs/python/refactoring-python-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Visual Studio provides several commands for automatically transforming and clean

## Rename

1. Right-click the identifier you wish to rename and select **Rename**, or place the caret in that identifier and select the **Edit** > **Refactor** > **Rename** menu command (**F2**).
1. Select and hold (or right-click) the identifier you wish to rename and select **Rename**, or place the caret in that identifier and select the **Edit** > **Refactor** > **Rename** menu command (**F2**).
2. In the **Rename** dialog that appears, enter the new name for the identifier and select **OK**:

![Rename prompt for new identifer name](media/code-refactor-rename-1.png)
Expand Down Expand Up @@ -66,7 +66,7 @@ Finally, if something would normally be excluded but has other values that would

When writing code, it's easy to end up with `import` statements for modules that aren't being used at all. Because Visual Studio analyzes your code, it can automatically determine whether an `import` statement is needed by looking at whether the imported name is used within the scope below where the statement occurs.

Right-click anywhere in the editor and select **Remove Imports**, which gives you options to remove from **All Scopes** or just the **Current Scope**:
Use select and hold (or right-click) anywhere in the editor and select **Remove Imports**, which gives you options to remove from **All Scopes** or just the **Current Scope**:

![Remove imports menu](media/code-refactor-remove-imports-1.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/python/search-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Visual Studio ignores the search path environment variable, however, even when t

Visual Studio thus provides a means to specify search paths directly in both environments and projects. Code that you run or debug in Visual Studio receives search paths in the value of `PYTHONPATH` (and other equivalent variables). By adding search paths, Visual Studio inspects the libraries in those locations and builds IntelliSense databases for them when needed (Visual Studio 2017 version 15.5 and earlier; constructing the database may take some time depending on the number of libraries).

To add a search path, go to **Solution Explorer**, expand your project node, right-click on **Search Paths**, select **Add Folder to Search Path**:
To add a search path, go to **Solution Explorer**, expand your project node, select and hold (or right-click) on **Search Paths**, and select **Add Folder to Search Path**:

::: moniker range="vs-2017"
![Add Folder to Search Path command on Search Paths in Solution Explorer](media/search-paths-command.png)
Expand Down
Loading