Python Prompts Free Prompt

Python Script to Monitor Battery Status

Write a Python script that monitors laptop battery status using psutil
☆ Save
Prompt
You are a Python developer. Write a script that checks battery percentage and charging status. Use psutil. The script must: 1) Get battery info, 2) Alert when low, 3) Log to file, 4) Run continuously, 5) Display notification, 6) Handle no battery, 7) Provide a simple GUI. Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.