Read | Practice | Advance
If python is correctly setup then system environment variable PATH will contain two directory path such as
If somehow these aren’t set automatically then you have to set those manually and check again using python --version and pip --version command
.NET developer can easily work on python in visual studio 2017 or later and as well as earlier version with some workarounds.
If you can setup python environment correctly, You can see the python environments in visual studio from menu View→Other Windows→Python Environments and Python Interactive Window as screenshot below
Open Visual Studio and Go to File menu then New -> Project then as screenshot below
As I said above, Python is a modular language like nodejs. Here you can also install pip packages whatever you need. To install any package you have to right click on python environment node in your puthon project and select Install Python Package then search for your package ( in my case mssql) and click on your desired package link as shown below.
You may not need to remember all python code syntax. Visual studio will help you to insert code snippet into your place using Ctrl+K Ctrl+X.
Or you type any python keywords such as for, if etc and press TAB, you will get full statement structure as shown below
from os import environ print("My Environment Information") keys = environ.keys() count = 0 for key in keys: if environ[key] != None: print(key + " = "+ environ[key]) count += 1 print("There are ", count, " information")
You can set break point and debug as .Net program as well as can view any variable value in watch windows as below
I think this session may help for Python beginners as well as .NET guys.