Template:PT3 PYTHON WIN VS 1: Difference between revisions

From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT3_PYTHON_WIN_VS_1"> <div class="phd-slide-deck-header"><h3>Language - Python</h3></div> <div class="phd-slides"> <div class="phd-slide...")
 
No edit summary
 
Line 3: Line 3:
<div class="phd-slides">
<div class="phd-slides">
<div class="phd-slide">
<div class="phd-slide">
<h2>Installing the Phidget Python Module</h2>
<h2>Installing the Phidget Python Package</h2>


<p>You can install the Phidget22 libraries for your current Visual Studio project with PIP by opening <b>View > Other Windows > Python Environments</b></p>
<p>You can install the Phidget Python Package for your current Visual Studio project with PIP by opening <b>View > Other Windows > Python Environments</b></p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS_1/-x325/50/VisualStudio_PythonEnvironments.png"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS_1/-x325/50/VisualStudio_PythonEnvironments.png"></div>
Line 11: Line 11:


<div class="phd-slide">
<div class="phd-slide">
<h2>Installing the Phidget Python Module</h2>
<h2>Installing the Phidget Python Package</h2>


<p>Next, select <b>Packages (PyPI)</b> from the drop-down menu:</p>
<p>Next, select <b>Packages (PyPI)</b> from the drop-down menu:</p>
Line 19: Line 19:


<div class="phd-slide">
<div class="phd-slide">
<h2>Installing the Phidget Python Module</h2>
<h2>Installing the Phidget Python Package</h2>


<p>Type <b>Phidget22</b> into the search bar, then click <b>Install Phidget22</b>:</p>
<p>Type <b>Phidget22</b> into the search bar, then click <b>Install Phidget22</b>:</p>

Latest revision as of 23:23, 3 January 2025

Installing the Phidget Python Package

You can install the Phidget Python Package for your current Visual Studio project with PIP by opening View > Other Windows > Python Environments

Installing the Phidget Python Package

Next, select Packages (PyPI) from the drop-down menu:

Installing the Phidget Python Package

Type Phidget22 into the search bar, then click Install Phidget22:

Success! Your project now has access to Phidget22.

Setting Up a New Project

When you are building a project from scratch, or adding Phidget functionality to an existing project, you'll need to configure your development environment to properly link the Phidget Python library.

To start, create a new Python project:

Setting Up a New Project

Then open the Python file that was generated with the project.

Finding Code Samples

To find the code sample to use for your Phidget, navigate to the Code Samples page and select your device from the drop-down menu.

Once you select your device, the code sample generator will give you a working code sample, and a selection of options to customize it to your needs.

Using the Code Samples

If it's unclear what any of the options do, click on the nearby '?' for more info.

Once you've made your selections, click the copy button and paste the code into your new project.

What's Next?

Now that you've set up Phidgets in your programming environment, you should read our guide on Phidget Programming Basics to learn the fundamentals of programming with Phidgets.

«
»