In this article, we are going to write a python script for screen rotation and implement it with GUI.
The display can be modified to four orientations using some methods from the rotatescreen module, it is a small Python package for rotating the screen in a system.
pip install rotate-screen
Step 1) Import the required module in the python script.
Step 2) Create an object of rotatescreen.get_primary_display() to access the main screen of the system.
Step 3) Now use various methods to rotate the screen.
- set_landscape(), Rotate Up
- set_portrait_flipped(), Rotate Left
- set_landscape_flipped(), Rotate Down
- set_portrait(), Rotate Right
Below is the complete program of the above approach along with GUI implementation.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Build an Application to Search Installed Application using Python
- Build a GUI Application to Get Live Stock Price using Python
- Build an Application to extract URL and Metadata from a PDF using Python
- Build a GUI Application to get distance between two places using Python
- Build an Application for Changing PC's Wallpaper using Python
- Build an Application to extract news from Google News Feed Using Python
- Build an GUI Application to Get Live Air Quality Information Using Python.
- Build a GUI Application to ping the host using Python
- Build an Application to translate English to Hindi in Python
- Python | Build a REST API using Flask
- Build a simple Quantum Circuit using IBM Qiskit in Python
- Build a Virtual Assistant Using Python
- Build a basic Text Editor using Tkinter in Python
- Build a COVID19 Vaccine Tracker Using Python
- Build Fuel Price Tracker Using Python
- Build a Voice Recorder GUI using Python
- Getting screen's height and width using Tkinter | Python
- Replace Green Screen using OpenCV- Python
- Create a Screen recorder using Python
- How to Control Laptop Screen Brightness using Python?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.