Skip to content

Instantly share code, notes, and snippets.

@Barakat
Barakat / compiled_file_python_version.py
Created November 6, 2023 21:08 — forked from delimitry/compiled_file_python_version.py
Get the version of Python by which the file was compiled
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A script to get the version of Python by which the file was compiled
"""
from __future__ import print_function
import binascii
import os