idle

Get Mac idle time C or Python

How can i get system idle time (no keys pressed - mouse moved) in C or Python? EDIT: My program suspend a counter when idle time > 10 sec ...

wxPython with wxFormBuilder - How to use wx.EVT_IDLE

Hi, I can't seem to bind the EVT_IDLE to my OnIdle function. I created a form using the wxFormBuilder. It generates the python code in Form.py. I specfied for the TopFrame that the OnIdle event should be associated with TopFrameOnIdle (actually, it generates that name automatically when double clicking OnIdle in Events tab). When I tr...

pygame not found

Hello. I am running in ubuntu and I can code in python, without problem. I have tried to install pygame and to do make it so, I did: sudo apt-get instal python-pygame When I go into the python IDLE and write: import pygame I get: Traceback (most recent call last): File "", line 1, in ImportError: No module name...

Android: the three phone states

Why when a call is answered idle is not called after it finishes? I cannot figure out for the life of me how to detect the end of an incoming call. Idle works fine for missed called, but subsequent to an answered call seems like a mysterious state. Anyone know how to detect the end of an incoming call? ...

Idle Subprocess connection problem

I'm new to python programming, and want to try to edit scripts in IDLE instead of the OSX command line. However, when I try to start it, it gives me the error "Idle Subprocess didn't make a connection. Either Idle can't start a subprocess or personal firewall software is blocking the connection." I don't have a firewall configured, so wh...

Detecting Idle status and Logging user out (WinForms)

I am currently developing a system that has need for a session time out like subsystem. It is a compact framework 3.5 application, but the principles are very similar to WinForms, so most Winforms solutions will likely work. Here is the deal, I would like a way to throw an event which lets the MainForm, which is controlling the show, kn...

How to detect user inactivity in Qt?

How can I detect user inactivity in a Qt QMainWindow? My idea so far is to have a QTimer that increments a counter, which, if a certain value is passed, locks the application. Any mouse or key interaction should set the timer back to 0. However I need to know how to properly handle input events which reset; I can re-implement: virtual v...

Is there any way to break lost or idle connections TCP/IP in the PostgreSQL 8.4 in a Windows Server 2008?

I've asked: http://stackoverflow.com/questions/3366619/how-to-break-connections-tcp-ip-by-keepalive-postgresql-without-changing-anything And now, I want to confirm: My system (C#.NET, NHibernate and Active Record) is running with a database PostgreSQL 8.4 and a Windows Server. I need a way to break idle or lost TCP/IP connections and u...

process_file(sys.argv[1]) IndexError: list index out of range

This is the code I am working with that comes from Practical Programming: import sys def process_file(filename): '''Open, read, and print a file.''' input_file = open(filename, "r") for line in input_file: line = line.strip() print line input_file.close() if __name__ == "__main__": process_file(sys.argv[1]) After import ...

Python IDLE is not starting on Windows 7

I used to use Python 2.7 and then IDLE was working. I uninstalled it and installed Python 3.1. Right now Idle cannot launch. What should i do to get it running? NOTE: I tried c:\Python31\pythonw.exe c:\Python31\Lib\idlelib\idle.py i uninstalled 3.1 and installed back 2.7, not working neither... ...

How to find out that a running Linux machine is idle or not

I have my laptop, most of the time connected to internet, the speed of internet is quite slow. When i download some big files, then i am not able to surf web sites because of slow speed of internet. My plan is to write a bash script and run it in cron jobs, when it finds the system is idle then it starts a process(the process which will ...

WPF Application slow when coming back from idle

I have a WPF (.Net 3.5 sp1) application that loads a bunch of data on start up (it takes a few seconds to start up) but it performs fine after the data is loaded. While the app is running, if I don't touch it for some time (say, a few hours), and then I alternate to it, it then "wakes up" very slowly. My questions: 1) Why is that? Is...

Idle hadoop master - how to make it do some work?

Hi, I have launched a small cluster of two nodes and noticed that the master stays completely idle while the slave does all the work. I was wondering what is the way to let master run some of the tasks. I understand that for a larger cluster having a dedicated master may be necessary but on a 2-node cluster it seems an overkill. Thanks...

Python meta-debugging

Heyo, Just started writing an assembler for the imaginary computer my class is creating wire-by-wire since the one the TA's provided sucks hard. I chose python even though I've never really used it that much (but know the basic syntax) and am loving it. My favorite ability is how I can take a method I just wrote, paste it into the she...

Python code that doesn't work from the command line

A module that I have written (test.py) in Python 2.6 can be imported and run perfectly well from with the Python IDLE with the commands: import test test.run_test_suite() However if I use the command "python test.py" at the command line, it crashes apparently (according to traceback) on the command "import os". As you can see from th...

Hide mouse cursor on OS X after a few seconds

For my fullscreen app, I want to hide the cursor after a few seconds if it's not moved, like the fullscreen mode in QuickTime or iTunes. Presumably I'm looking to call [NSCursor setHiddenUntilMouseMoves:YES], but how do I know when to call it? Presumably I'm looking for the same as http://stackoverflow.com/questions/744980/hide-mouse-cu...

Trigger an event when system locks/unlocks on Windows XP

Please help me to find a way to track lock/unlock time on my WinXP machine. I've tried windows scheduler - it only logs logins, not locks. Any alternatives? In Miranda's source code I saw implementation via IdleObject tracker, but this way is too long. May be an AutoIt script? Time tracking program (freeware)? ...

Python IDLE freezes when invoking File > New Window

I am running Mac OS X Snow Leopard ( version 10.6.4 ) with Python Version 2.6.1 Tk Version 8.5 IDLE Version 2.6.1 If I launch IDLE and enter Python statements in the initial window that is presented, all seems fine. However, if, in the IDLE session, I invoke the menu item File > New Window a new window does a...

iOS device goes idle, network stops. How do i get notified about entering the 'idle' state?

My app has a screen where it is constantly polling a server for information. When the user does not interact with the app it goes idle, the screen goes dim and then black. In the background, the app still tries to poll to service, but gets -1009 error codes from NSURLConnection. (-1009 == NSURLErrorNotConnectedToInternet) My idea is to...

Application idle timeout - Want to implement autolock for a specific idle interval

i want to implement auto lock for a specific idle time interval. How can i increase iphone autolock idle time feature programmatically ? Thanks ...