Skip to content

Detecting the executable Python version of Stack Overflow's Python code snippets

License

Notifications You must be signed in to change notification settings

ysy-dlg/PyVerDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyVerDetector

PyVerDetector is a Chrome extension for Stack Overflow that detects whether a given code snippet can be interpreted with the selected Python version.

Building

In order to build PyVerDetector, flex, bison version 3.0 or higher and emscripten are required as dependencies. Note that these are build-time dependencies only, and are not required for the extension to run. In addition, to run the version checker locally, decoupled from the extension, a compiler like gcc or clang is also required.

Additionally, on macOS, the default bison version is too old and must be upgraded, and GNU sed is required instead of the BSD one. These two tools must be in PATH instead of their default counterpart.

To build the extension, run make from the project root. This will generate additional files in the unpacked/ folder and finalize the extension code. This will generate also a standalone version checked in the folder backend/build called pyverdetector that can be run as pyverdetector <file to detect>.

Credits

This project is inspired by the research work of Malloy and Power in MalloyPower/python-compliance.

About

Detecting the executable Python version of Stack Overflow's Python code snippets

Resources

License

Stars

Watchers

Forks

Packages

No packages published