mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-26 04:41:34 -08:00
19 lines
433 B
Python
19 lines
433 B
Python
import os
|
|
import sys
|
|
|
|
|
|
def is_running_in_termux():
|
|
# Check environment variables
|
|
if os.environ.get("TERMUX_VERSION") is not None:
|
|
return True
|
|
|
|
# Check Python installation path
|
|
if sys.prefix.startswith("/data/data/com.termux/files/usr"):
|
|
return True
|
|
|
|
# Check for Termux-specific binary
|
|
if os.path.exists("/data/data/com.termux/files/usr/bin/termux-info"):
|
|
return True
|
|
|
|
return False
|