Visual Studio Code for Python Programmers

(0) Erste Bewertung abgeben
CHF 33.75
Download steht sofort bereit
E-Book (pdf)
Informationen zu E-Books
E-Books eignen sich auch für mobile Geräte (sehen Sie dazu die Anleitungen).
E-Books von Ex Libris sind mit Adobe DRM kopiergeschützt: Erfahren Sie mehr.
Weitere Informationen finden Sie hier.

Beschreibung

Become proficient and efficient with Visual Studio Code and learn how to integrate all your external tools!

Visual Studio Code for Python Programmers helps Python developers become not just familiar, but productive in Visual Studio Code. To start, you'll find the steps for installing Visual Studio Code on Windows, Mac and Linux platforms, along with an introduction to the editing features of the workspace. Coverage of more advanced functionality includes managing source code, debugging, unit testing, and Jupyter Notebook support. The book finishes with a walk-through of real-world projects which utilize Visual Studio Code features introduced in the book.

For developers, the choice of an editor is a very personal one. You have idiosyncratic needs and wants that are unique to you as a developer. This book will help you learn how to customize Visual Studio Code to meet your needs and Python development workflow.
* Introduces you to the features of the Visual Studio Code workspace and how those features can be customized
* Demonstrates how Visual Studio Code allows you to choose your structure according to your needs
* Covers editing code in Python, including syntax highlighting, code completion, object definition, refactoring, and code navigation
* Describes Git integration and how to perform common Git functions (commits, checkouts, branches, and merges) from within Visual Studio Code
* Highlights debugging features for Python developers
A final section on Real World Applications will step you through several examples (and features integration with Django, Flask, Jupyter Notebook, Docker, and Azure), so you can hit the ground running with Visual Studio Code.



Autorentext

APRIL SPEIGHT is a developer who specializes in Python and conversational design for chat bots and AI Assistants. Her passion for learning and teaching Python led to her first published title, Bite-Size Python: An Introduction to Python Programming. She currently works on content creation and developer community engagement for Spatial Computing and Mixed Reality at Microsoft.

Klappentext

MASTER VISUAL STUDIO CODE AND CUSTOMIZE IT TO MEET YOUR UNIQUE NEEDS

Visual Studio Code offers a robust source code editor and development environment. It's a free download that's fast, lightweight, and available for Windows, Mac, and Linux. Along with support for IntelliSense, refactoring capabilities, and an extensive ecosystem of extensions, it also offers debugging support. Once you master it, you can open a Python project from within Visual Studio Code and get end-to-end execution and debugging functionality.

Arranged in three parts, this guide helps Python developers become not just familiar with Visual Studio Code, but productive in its use. Part 1 gets you started with the steps for installing Visual Studio Code, installing the Python extension, and exploring the editing features of the workspace. Part 2 examines the Python extension essentials, covering editing Python code, debugging, using snippets, and testing, as well as the integration Visual Studio Code provides to external tools like Git. Part 3 takes you into real world applications, featuring integration with Jupyter Notebook, GitHub, Django, Flask, Docker, and Azure.

You'll be ready to hit the ground running as you learn to:

  • Use all the features of the Visual Studio Code workspace
  • Customize those features for your needs
  • Choose the structure for your project
  • Edit code in Python, including syntax coloring, IntelliSense, refactoring, and code navigation
  • Perform common Git functions from within Visual Studio Code
  • Debug your code using JSON


Inhalt

Introduction xix

Part I Welcome to Visual Studio Code 1

Chapter 1 Getting Started 3

Installing Visual Studio Code 4

The Visual Studio Code User Interface 4

Activity Bar 5

Side Bar 6

Editor 7

Panels 11

Status Bar 12

Command Palette 12

Extensions 14

Customizations 15

Settings 16

Color Themes and Icons 18

Keybindings 18

Display Langage 18

Summary 19

Chapter 2 Hello World for Python 21

Installing a Python Interpreter 21

macOS 22

Linux 22

Windows 22

Installing the Python Extension for Visual Studio Code 22

Creating a Python File 23

Selecting an Interpreter 24

Setting a Default Interpreter 26

Settings Editor 26

settings.json File 26

Selecting a Linter 26

Editing a Python File 27

Running a Python File 29

Workflow Recap 30

Summary 31

Chapter 3 Editing Code 33

Quick Fixes 34

Code Completion, Definitions, and Declarations 35

Formatting 38

Edit Formatting Settings in the Settings Editor 39

Edit Formatting Settings in settings.json 40

Linting 41

Enable and Disable Linting 41

Run Linting 42

Linting Settings 43

Refactoring 44

Extract Variable 44

Extract Method 45

Sort Imports 46

Snippets 47

Summary 48

Part II Additional Visual Studio Code Features 51

Chapter 4 Managing Projects and Collaboration 53

Files and Folders 53

Open a Project 54

Navigate Files 56

Search across Files 57

Close a File or Folder 60

Environments 60

Virtual Environments 61

Conda Environments 61

Source Control 63

Initialize a Repository 65

Commit Changes 66

Branches 69

Remotes 70

Gutter Indicators 71

View Diffs 71

Push and Merge Commits 73

Pull Requests 74

Live Share 74

Install Live Share 75

Sign In to Live Share 76

Share a Project 76

Join a Session 78

Editing and Collaboration 80

Follow a Participant 80

Share a Terminal 81

Summary 82

Chapter 5 Debugging 83

Starting a Debug Session 84

Debug Commands 89

Continue 89

Step Over 90

Step Into 90

Step Out 91

Stop 91

Restart 92

Call Stack 92

Triggering a Breakpoint 93

Logpoints 95

Watch 96

The Debug Console 98

Launch Configurations 101

Summary 104

Chapter 6 Unit Testing 105

Enable and Discover Tests 105

Run Tests 109

Debug Tests 113

Summary 115

Chapter 7 Jupyter Notebook 117

Creating and Opening a Jupyter Notebook 118

Code Cell Modes 120

Adding Cells 121

Editing Cells 122

Running a Cell 124

Running a Single Cell 124

Running All Code Cells 124

Running Cells Above and Below a Code Cell 125

Additional Commands 126

Viewing Variables and Data 126

Viewing Plots 128

Debugging a Jupyter Notebook 129

Connecting to a Remote Server 130

Exporting a Notebook 131

Summary 132

Chapter 8 Using Git and GitHub with Visual Studio Code 135

Getting Started 135

<...

Mehr anzeigen

Produktinformationen

Titel
Visual Studio Code for Python Programmers
Autor
EAN
9781119773382
Format
E-Book (pdf)
Hersteller
Wiley
Genre
Programmiersprachen
Veröffentlichung
04.06.2021
Digitaler Kopierschutz
Adobe-DRM
Dateigrösse
11.83 MB
Anzahl Seiten
256
Mehr anzeigen
Andere Kunden kauften auch