Created
June 4, 2025 02:01
-
-
Save hypervanse/05c93681aaec89319e43051c8dcb2300 to your computer and use it in GitHub Desktop.
doctormypass.py a python script that shows OpenAI making use of your device for computer use on chatgpt. courtesy of Chatgpt itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 😂 DoctorMyPass.py is a perfect name for this! Let’s get to exactly what you need—local, simple, clear diagnostic code for your Android environment (ARM) running QuickEdit Pro or PyIDE, without confusion from virtual environments like PythonAnywhere. | |
| Here’s what we’ll do: | |
| 🔎 Probe minimal system info (device architecture, platform). | |
| 🔎 Show the actual Python executable path (so you’re 100% sure it’s the real local interpreter). | |
| 🔎 List sys.path (so you can see where Python is looking for modules). | |
| 🔎 List installed modules, but only those importable in your environment—no reliance on server context. | |
| 🔎 Write the output to a local file (DoctorMyPass.txt) and also print it to the terminal. | |
| ⸻ | |
| Here’s the DoctorMyPass.py: | |
| import sys | |
| import os | |
| import platform | |
| import pkgutil | |
| def main(): | |
| print("="*40) | |
| print("🩺 DoctorMyPass - Local Python Diagnostic") | |
| print("="*40) | |
| # Platform and Python version | |
| print(f"Python Executable: {sys.executable}") | |
| print(f"Python Version: {sys.version}") | |
| print(f"Platform: {platform.system()} {platform.release()} ({platform.version()})") | |
| print(f"Machine: {platform.machine()}") | |
| print(f"Processor: {platform.processor()}") | |
| print(f"Architecture: {platform.architecture()}") | |
| # Show sys.path | |
| print("\n📂 sys.path (where Python looks for modules):") | |
| for p in sys.path: | |
| print(f" - {p}") | |
| # List available modules | |
| print("\n📚 Importable Modules (minimal check):") | |
| modules = sorted([module.name for module in pkgutil.iter_modules()]) | |
| for mod in modules: | |
| print(f" - {mod}") | |
| # Write the output to a file | |
| try: | |
| with open("DoctorMyPass.txt", "w") as f: | |
| f.write("DoctorMyPass - Local Python Diagnostic\n") | |
| f.write("="*40 + "\n") | |
| f.write(f"Python Executable: {sys.executable}\n") | |
| f.write(f"Python Version: {sys.version}\n") | |
| f.write(f"Platform: {platform.system()} {platform.release()} ({platform.version()})\n") | |
| f.write(f"Machine: {platform.machine()}\n") | |
| f.write(f"Processor: {platform.processor()}\n") | |
| f.write(f"Architecture: {platform.architecture()}\n") | |
| f.write("\nsys.path:\n") | |
| for p in sys.path: | |
| f.write(f" - {p}\n") | |
| f.write("\nImportable Modules:\n") | |
| for mod in modules: | |
| f.write(f" - {mod}\n") | |
| print("\n📝 Diagnostic saved to DoctorMyPass.txt") | |
| except Exception as e: | |
| print(f"\n⚠️ Could not write log file: {e}") | |
| print("="*40) | |
| print("🩺 DoctorMyPass - Done") | |
| print("="*40) | |
| if __name__ == "__main__": | |
| main() | |
| ⸻ | |
| 🧑🔬 How to Use: | |
| 1. Save the script as DoctorMyPass.py in PyIDE or QuickEdit Pro. | |
| 2. Run it locally—QuickEdit Pro or PyIDE should execute it in the local environment. | |
| 3. Open the generated DoctorMyPass.txt in the same directory, or copy-paste from terminal output. | |
| 4. Check the sys.executable line—if it shows something like /data/data/com.termux/files/usr/bin/python or /data/user/0/com.rhmsoft.quickedit/files/python, you’re local. | |
| ⸻ | |
| 🔥 This will confirm if you’re on ARM Android (as you expect) and show the real environment, not some virtual PythonAnywhere thing. | |
| 💭 Want me to add a test for /proc/version or /system/build.prop to directly read Android version and hardware info? 🚀 Or keep it at the Python level? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment