Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>XAI_Py2vsPy3New to Visual Studio Code? Get it now.
XAI_Py2vsPy3

XAI_Py2vsPy3

UAH CS

|
103 installs
| (0) | Free
A Visual Studio Code extension that classifies Python scripts as Python 2 or Python 3 and highlights syntax responsible for this classification.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Py2vsPy3 Classifier Extension

Description

This Visual Studio Code extension leverages a pre-trained machine learning model to classify code. Originally designed to distinguish between Python 2 and Python 3 scripts, it can also classify other programming languages such as Java, or differentiate between Python and Java, provided the appropriate model is supplied. Additionally, it highlights code segments responsible for the classification, offering insights into specific syntax or constructs.

Features

  • Direct code analysis within Visual Studio Code.
  • Automatic loading and application of pre-trained machine learning models.
  • Flexible to support various programming languages with custom models.
  • Highlighting of specific code parts identified based on the model’s classification.

Installation

To install the Py2vsPy3 Classifier from the Visual Studio Marketplace, follow these steps:

  1. Open Visual Studio Code.
  2. Navigate to the Extensions view by clicking on the square icon on the sidebar, or pressing Ctrl+Shift+X.
  3. Search for "Py2vsPy3_Classifier".
  4. Click on the 'Install' button to install the extension.

Usage

Follow these steps to analyze your code:

  1. Open any script within Visual Studio Code.
  2. Activate the Command Palette by pressing Ctrl+Shift+P (or Cmd+Shift+P on macOS).
  3. Type 'Analyze Code' and select it from the list to start the analysis.
  4. Choose the explainer type and window size for the analysis when prompted.
  5. Optionally, customize the model or explainer path by going to File > Preferences > Settings > Extensions > Py2vsPy3_Classifier and entering the path to your local model or explainer.

Configuration

  • cext.modelPath: Customize the path to the machine learning model file. If not set, the default model is used. Access this setting through File > Preferences > Settings, then search for 'Py2vsPy3_Classifier' to specify your custom model path.

License

This project is currently unlicensed and all rights are reserved. This means you are not granted rights to reproduce, distribute, or create derivative works from this software.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft