73fadc5e97
* Relocate code to fix type dependencies. * Fix missing and unused imports. * Fix type hints. * Suppress PyCharm false positives. * Avoid shadowing `file` built-in. * Use json.JSONEncoder directly instead of super(). This matches the recommended usage and avoids a PyCharm warning. * Remove redundant regex escape. * Remove redundant find_python call. * Use tarfile.open directly. * Add changelog fragment.
15 lines
376 B
Python
Executable file
15 lines
376 B
Python
Executable file
#!/usr/bin/env python
|
|
"""Detect the real python interpreter when running in a virtual environment created by the 'virtualenv' module."""
|
|
from __future__ import (absolute_import, division, print_function)
|
|
__metaclass__ = type
|
|
|
|
import json
|
|
|
|
try:
|
|
from sys import real_prefix
|
|
except ImportError:
|
|
real_prefix = None
|
|
|
|
print(json.dumps(dict(
|
|
real_prefix=real_prefix,
|
|
)))
|