Development Environment
Introduction

As mentioned, this is also not a class about learning Python. We selected Python due to its popularity, readability, and the abundance of external libraries like Zeep (a SOAP client) and Software Development Kits (SDKs) such as wxc_sdk. If you've had some experience with Python, even as a novice, the concepts introduced here shouldn't be overly complicated. If you're new to Python, don't worry; we've provided enough guidance for you to complete the tasks with little to no prior knowledge.

Python uses white-space indentation instead of curly braces or keywords to organize code blocks (such as everything that belongs to the same function or within the same if clause). As you go through the lab, ensure that pasted code has the correct indentation. There should always be a comment or existing code line to guide you on the alignment.

For all Python coding in this project, you will use Visual Studio Code (VS Code), a popular free source code editor from Microsoft. You will edit and run your Python code and the Provisioning Portal in this lab environment on a remote Linux development server. Your Pod's dedicated development server will have a web-based VS Code instance running. This web-based VS Code application is called code-server. You can find more information about VS Code, code-server, and your development environment in the Reference section.

Step 1 - Launch Visual Studio Code

  1. Access your VS Code instance: https://dev1.pod6.col.lab:8443

  2. On the left side, click the Explorer icon and you see a list of folders and files under Workspace. The files you will be working with initially will be in the examples folder.
  3. In the Explorer, navigate to examples and click to open hello_world.py. You now have the file open for editing.

Step 2 - Run a Program

One of VS Code's features is the ability to run applications from within the development environment.

  1. In VS Code, click the Run and Debug button.
  2. You should see a preconfigured Configuration for running this web application called Python: hello_world.py at the top of the column:
  3. Click the green start arrow next to the RUN AND DEBUG text . Doing so launches a terminal window at the bottom where the output of the command is displayed.

  4. You will notice that the output is displayed as a log line, since the "logging" facility was used to display the text instead of a print. This is how we will generally display all console-type output.

Congratulations on successfully running your first Python program in Visual Studio Code! You are now well-equipped to delve into the world of Cisco Collaboration APIs using Python.