mirror of
https://github.com/elisspace/core.git
synced 2026-09-01 17:04:05 +00:00
10 lines
267 B
Python
10 lines
267 B
Python
""" Environement helpers. """
|
|
import sys
|
|
|
|
|
|
def is_virtual():
|
|
""" Return if we run in a virtual environtment. """
|
|
# Check supports venv && virtualenv
|
|
return (getattr(sys, 'base_prefix', sys.prefix) != sys.prefix or
|
|
hasattr(sys, 'real_prefix'))
|