473,941 Members | 6,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to turn of the monitor by python?

I want to turn off my monitor from within python, How to do it?
Thanks!

Dec 13 '06 #1
2 1996
co*******@gmail .com wrote:
I want to turn off my monitor from within python, How to do it?
Thanks!
Do you realize that hardware management and control is OS dependant?
When asking such questions always specify OS.

Assuming you are interested in Windows, then you just need to translate
this <http://www.codeproject .com/system/display_states. aspC API calls
into python. You can use ctypes (included in Python 2.5) or python
win32 extensions.

-- Leo

Dec 13 '06 #2
Thank you, that's exactly what I want.

Sorry I didn't give my OS info.
Leo Kislov wrote:
co*******@gmail .com wrote:
I want to turn off my monitor from within python, How to do it?
Thanks!

Do you realize that hardware management and control is OS dependant?
When asking such questions always specify OS.

Assuming you are interested in Windows, then you just need to translate
this <http://www.codeproject .com/system/display_states. aspC API calls
into python. You can use ctypes (included in Python 2.5) or python
win32 extensions.

-- Leo
Dec 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1008
by: Skip Montanaro | last post by:
For those who don't monitor python-mode checkins (does anyone? I doubt it), I checked in a couple changes to the python-mode package in the past few days which may be of interest. I thought I would post a note so interested parties can beat on things. * TAB key cycling - When you type a newline or hit the TAB key the cursor moves to the mode-specific idea of the correct tab stop. Hit TAB again and it will back out a stop. You can keep...
2
2454
by: Claudio Grondi | last post by:
"You don't have to rely on expensive and proprietary EDI conversion software to parse, validate, and translate EDI X12 data to and from XML; you can build your own translator with any modern programming language, such as Python." by Jeremy Jones http://www.devx.com/enterprise/Article/26854 Excerpt: "Python is an object-oriented, byte-compiled language with a clean
32
2315
by: Xah Lee | last post by:
is it possible to write python code without any indentation? Xah xah@xahlee.org http://xahlee.org/PageTwo_dir/more.html
38
4846
by: BORT | last post by:
Please forgive me if this is TOO newbie-ish. I am toying with the idea of teaching my ten year old a little about programming. I started my search with something like "best FREE programming language for kids." After MUCH clicking and high-level scanning, I am looking at Python and Forth. Both have advocates that say each is a great approach to learning computers. My programming classes were a long, long time ago in a land far, far...
113
5411
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside the Python world, you're fine. But once you do, things go downhill. MySQLdb has version and platform compatibility problems. So does M2Crypto. The built-in SSL support is weak. Even basic sockets don't quite work right; the socket module...
2
3635
by: cruddpuppet | last post by:
My school computer has monitor issues (turns off every 2 minutes) and I have to constantly turn it back on. I don't have the software or the privelages to install the software needed to scan for viruses, and there are no more extra computers in class, so I'm forced to use this one. I was wondering if there was a way to turn the monitor off/on with python. I know how to set the switch (use pyHook, check if the 'esc' button is pressed, if it is,...
5
1425
by: dongarbage | last post by:
Hi, Is there a way to create a .dll from a python program which includes the python runtime? I'm building a Windows application (C# VisualStudio2005) and I'd like to utilize some of the functionality available in a Python module. For my users who install my Windows application, I'd prefer that they not have to install the entirety of Python on their machines.
23
3920
by: Just Another Victim of the Ambient Morality | last post by:
I'm looking for a linked list implementation. Something iterable with constant time insertion anywhere in the list. I was wondering if deque() is the class to use or if there's something else. Is there? Thank you...
1
1083
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I don know how windows turn monitor or harddisk off??? I want to add same feature in my app so that my app can be a power saving app for laptops. I want to use different poweschemes as we do in Explorer. Bytheway is this controlled by the explorere or by any service??? I think it is controlled by explorer... Plz correct me if i m wrong. Other wise i dont need to add this feature..... Thanx >> ALI <<
16
1779
by: John Salerno | last post by:
Just something that crosses my mind every time I delve into "Learning Python" each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason? I mean, sure, there's value in learning anything at any time, but for something like a programming language, I can't help but feel that I will be mostly unable to use what I learn simply because I have no reason to use it. The *process* of...
0
11529
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11111
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11294
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9858
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.