Skip to content

Commit a6083a8

Browse files
committed
few small changes
1 parent 80a3493 commit a6083a8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/python/selecting-a-python-environment-for-a-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ A virtual environment is a unique combination of a specific Python interpreter a
4646

4747
A benefit to using a virtual environment is that as you develop project over time, the virtual environment always reflects the project's exact dependencies. (A shared global environment, on the other hand, contains any number of libraries whether you use them in your project or not.) You can then easily create a *requirements.txt* file from the virtual environment, which is then used to reinstall those dependencies on another development or production computer. For more information, see [Manage required packages with requirements.txt](managing-required-packages-with-requirements-txt.md).
4848

49-
When you open a project in Visual Studio that contains a *requirements.txt* file, Visual Studio automatically prompts gives you the option to recreate the virtual environment. On computers where Visual Studio isn't installed, such as Azure App Service, you can use `pip install -r requirements.txt` to restore the packages (this process is described on [Manage Python on Azure App Service](managing-python-on-azure-app-service.md)).
49+
When you open a project in Visual Studio that contains a *requirements.txt* file, Visual Studio automatically gives you the option to recreate the virtual environment. On computers where Visual Studio isn't installed, such as Azure App Service, you can use `pip install -r requirements.txt` to restore the packages (this process is described on [Manage Python on Azure App Service](managing-python-on-azure-app-service.md)).
5050

5151
Because a virtual environment contains a hard-coded path to the base interpreter, and because you can recreate the environment using *requirements.txt*, you typically omit the entire virtual environment folder from source control.
5252

docs/python/using-python-cookiecutter-templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The Cookiecutter home page displays a list of templates to choose from, organize
3333

3434
| Group | Description |
3535
| --- | --- |
36-
| **Installed** | Templates that have been installed to your local computer. When an online template is used, its repository is automatically cloned to a subfolder of *~/.cookiecutters*. You can delete a selected installed template by pressing **Del**. |
36+
| **Installed** | Templates that have been installed to your local computer. When an online template is used, its repository is automatically cloned to a subfolder of *~/.cookiecutters*. You can delete a selected installed template by pressing **Delete**. |
3737
| **Recommended** | Templates loaded from the recommended feed. The default feed is curated by Microsoft. See [Cookiecutter options](#cookiecutter-options) below for details on customizing the feed. |
3838
| **GitHub** | GitHub search results for the cookiecutter keyword. Results from GitHub come back paginated, if more results are available, **Load More** appears at the end of the list. |
3939
| **Custom** | When a custom location is entered in the search box, it appears in this group. You can either type in a full path to the GitHub repository, or the full path to a folder on your local disk. |

docs/python/working-with-c-cpp-python-in-visual-studio.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ For more information, see [Install Python support for Visual Studio](installing-
118118
| Tab | Property | Value |
119119
| --- | --- | --- |
120120
| **General** | **General** > **Target Name** | Specify the name of the module as you want to refer to it from Python in `from...import` statements. You use this same name in the C++ when defining the module for Python. If you want to use the name of the project as the module name, leave the default value of **$(ProjectName)**. |
121-
| | **General** > **Target Extension** | `.pyd` |
122-
| | **Project Defaults** > **Configuration Type** | `Dynamic Library (.dll)` |
123-
| **C/C++** > **General** | **Additional Include Directories** | Add the Python *include* folder as appropriate for your installation, for example, *c:\Python36\include*. |
121+
| | **General** > **Target Extension** | **.pyd** |
122+
| | **Project Defaults** > **Configuration Type** | **Dynamic Library (.dll)** |
123+
| **C/C++** > **General** | **Additional Include Directories** | Add the Python *include* folder as appropriate for your installation, for example, `c:\Python36\include`. |
124124
| **C/C++** > **Preprocessor** | **Preprocessor Definitions** | Add `Py_LIMITED_API;` to the beginning of the string (including the semicolon). This definition restricts some of the functions you can call from Python and makes the code more portable between different versions of Python. |
125-
| **C/C++** > **Code Generation** | **Runtime Library** | `Multi-threaded DLL (/MD)` (see Warning below) |
126-
| **Linker** > **General** | **Additional Library Directories** | Add the Python *libs* folder containing *.lib* files as appropriate for your installation, for example, *c:\Python36\libs*. (Be sure to point to the *libs* folder that contains *.lib* files, and *not* the *Lib* folder that contains *.py* files.) |
125+
| **C/C++** > **Code Generation** | **Runtime Library** | **Multi-threaded DLL (/MD)** (see Warning below) |
126+
| **Linker** > **General** | **Additional Library Directories** | Add the Python *libs* folder containing *.lib* files as appropriate for your installation, for example, `c:\Python36\libs`. (Be sure to point to the *libs* folder that contains *.lib* files, and *not* the *Lib* folder that contains *.py* files.) |
127127
128128
> [!Tip]
129129
> If you don't see the C/C++ tab in the project properties, it's because the project doesn't contain any files that it identifies as C/C++ source files. This condition can occur if you create a source file without a *.c* or *.cpp* extension. For example, if you accidentally entered `module.coo` instead of `module.cpp` in the new item dialog earlier, then Visual Studio creates the file but doesn't set the file type to "C/C+ Code," which is what activates the C/C++ properties tab. Such misidentification remains the case even if you rename the file with `.cpp`. To set the file type properly, right-click the file in **Solution Explorer**, select **Properties**, then set **File Type** to **C/C++ Code**.
@@ -207,7 +207,7 @@ If you're working with Python 2.7, refer instead to [Extending Python 2.7 with C
207207
};
208208
```
209209

210-
1. Add a method that Python calls when it loads the module, which must be named `PyInit_<module-name>`, where *&lt;module_name&gt;* exactly matches the C++ project's **General** > **Target Name** property (that is, it matches the filename of the *.pyd* built by the project).
210+
1. Add a method that Python calls when it loads the module, which must be named `PyInit_<module-name>`, where &lt;module-name&gt; exactly matches the C++ project's **General** > **Target Name** property (that is, it matches the filename of the *.pyd* built by the project).
211211

212212
```cpp
213213
PyMODINIT_FUNC PyInit_superfastcode() {

0 commit comments

Comments
 (0)