Search Results

Search found 1062 results on 43 pages for 'idle'.

Page 2/43 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Python: Networked IDLE?

    - by Rosarch
    Is there any existing web app that lets multiple users work with an interactive IDLE type session at once? Something like: IDLE 2.6.4 Morgan: >>> letters = list("abcdefg") Morgan: >>> # now, how would you iterate over letters? Jack: >>> for char in letters: print "char %s" % char char a char b char c char d char e char f char g Morgan: >>> # nice nice If not, I would like to create one. Is there some module I can use that simulates an interactive session? I'd want an interface like this: def class InteractiveSession(): ''' An interactive Python session ''' def putLine(line): ''' Evaluates line ''' pass def outputLines(): ''' A list of all lines that have been output by the session ''' pass def currentVars(): ''' A dictionary of currently defined variables and their values ''' pass (Although that last function would be more of an extra feature.) To formulate my problem another way: I'd like to create a new front end for IDLE. How can I do this?

    Read the article

  • How to stop Python program execution in IDLE

    - by joaoc
    I have a python script that uses plt.show() as it's last instruction. When it runs IDLE just hangs after the last instruction. I get the image but I don't get the prompt back. On other scripts I typically use ctrl-c to break the program (sometimes doesn't work immediately) but how do I get the prompt back with the plt.show()? Ctrl-c doesn't work... Are there other ways to stop the program? This is IDLE on Windows, if it makes any difference.

    Read the article

  • Set Idle Time in Ubuntu 12.04 Server

    - by ssanj
    I recently installed Ubuntu 12.04 Server and am looking for away for get the server to suspend after an idle time. When using the desktop version I could use the Gnome powersaving tool to specify the idle time. As I have no GUI on the server is there a way to set the server idle time via the commandline/config file? I will send the server a wake-on-lan packet to wake it up, if it is suspended and I need to use it.

    Read the article

  • Reload Method or Object in IDLE

    - by GSto
    when using idle, I know you can reload a module if it's changed like this: import foo reload(foo) if I only import part of a module, is there a way to reload it in a similar matter? from foo import bar

    Read the article

  • usleep() php5 uses 40% of idle CPU

    - by Marcin
    Hi guys I have a weird question, I have a cli php script which uses usleep (somtimes 1sec, sometimes 2sec, somtimes 100ms it depends) if there is some wait required, but what I have noticed its that once on usleep() it seems to use about 40% of idle CPU: Cpu(s): 5.3%us, 21.3%sy, 0.0%ni, 57.2%id, 0.0%wa, 0.0%hi, 0.0%si, 16.1%st any ideas ? cheers

    Read the article

  • Module import error using IDLE

    - by Nimbuz
    I'm an absolute beginner using IDLE (Python 2.6.4) to learn the basics. I recently found a Python program that I want to run but it throws an error although the code looks fine (i.e all modules exist): from css.parse import parse data = """ em { padding: 2px; margin: 1em; border-width: medium; border-style: dashed; line-height: 2.4em; } p { color: red; font-size: 12pt } p:first-letter { color: green; font-size: 200% } p:first-line { color: blue }""" for rule in parse(data): print rule for decl in parse(data)[0]: print decl Error: ImportError: No module named parse How do I fix this? I'm using Snow Leopard. Edit: I guess its a PATH issue, where should I place the modules, which directory?

    Read the article

  • Python IDLE: How to type correct indentation?

    - by user2988464
    Mac: Maverick Python: 3.4 I tried to testtimeit module in Python's IDLE import timeit >>> timeit.timeit( "obj.method", """ class SomeClass: def method(self): pass obj = SomeClass() """) When I tried to type def method(self): on the next line of class SomeClass, I hit Tab, it prompted a window showing the files inside my Document directory. So I hit Ctrl+Tab instead. But I still got the error: Traceback (most recent call last): File "<pyshell#26>", line 6, in <module> """) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/timeit.py", line 213, in timeit return Timer(stmt, setup, timer).timeit(number) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/timeit.py", line 122, in __init__ code = compile(src, dummy_src_name, "exec") File "<timeit-src>", line 9 _t0 = _timer() ^ IndentationError: unindent does not match any outer indentation level Can someone explain: how to fix it, and how to avoid the prompt of My Document appear? Thx!!!

    Read the article

  • Python IDLE freezes

    - by ooboo
    This is absolutely frustrating, but I am not sure if the following is an issue only on my machine or with IDLE in general. When attempting to print a long list in the shell, and that could happen by accident while debugging, the program crushes and you have to restart it manually. Even worse, if you have a few editor windows open, it always spawns a few sub-processes, and each of these has to be manually shut down from the task manager. Is there any way to avoid that? I am using Python 3, by the way.

    Read the article

  • Why does IDLE continue to crash? [migrated]

    - by Dyana
    Idle keeps crashing and I can't figure it out. After restarting the computer and reinstalling Python, none of which seemed to work, I looked to my peers and was told to "install one of the Tcl/Tk". After getting another opinion I was also told that I already had this and found it to be true but decided to try it anyway since it continued to crash. Nothing has improved and I have an assignment due. Any ideas on why this continues to happen and what I can do to fix the crash? Problem details: Process: Python [1183] Path: /Applications/Python 3.3/IDLE.app/Contents/MacOS/Python Identifier: org.python.IDLE Version: 3.3.0 (3.3.0) Code Type: X86-64 (Native) Parent Process: launchd [793] Date/Time: 2012-11-05 14:10:54.124 -0500 OS Version: Mac OS X 10.7.5 (11G63) Report Version: 9 Interval Since Last Report: 181805 sec Crashes Since Last Report: 4 Per-App Interval Since Last Report: 20 sec Per-App Crashes Since Last Report: 4 Anonymous UUID: 68994A08-7FFB-4074-A553-CB60A60BB412 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1007) creating CGSWindow on line 263'

    Read the article

  • Python - Code snippet not working on Python 2.5.6, using IDLE

    - by Francisco P.
    Hello, everyone I am using a piece of self-modifying code for a college project. Here it is: import datetime import inspect import re import sys def main(): # print the time it is last run lastrun = 'Mon Jun 8 16:31:27 2009' print "This program was last run at ", print lastrun # read in the source code of itself srcfile = inspect.getsourcefile(sys.modules[__name__]) f = open(srcfile, 'r') src = f.read() f.close() # modify the embedded timestamp timestamp = datetime.datetime.ctime(datetime.datetime.now()) match = re.search("lastrun = '(.*)'", src) if match: src = src[:match.start(1)] + timestamp + src[match.end(1):] # write the source code back f = open(srcfile, 'w') f.write(src) f.close() if __name__=='__main__': main() Unfortunately, it doesn't work. Error returned: # This is the script's output This program is last run at Mon Jun 8 16:31:27 2009 # This is the error message Traceback (most recent call last): File "C:\Users\Rui Gomes\Desktop\teste.py", line 30, in <module> main() File "C:\Users\Rui Gomes\Desktop\teste.py", line 13, in main srcfile = inspect.getsourcefile(sys.modules[__name__]) File "C:\Python31\lib\inspect.py", line 439, in getsourcefile filename = getfile(object) File "C:\Python31\lib\inspect.py", line 401, in getfile raise TypeError('{!r} is a built-in module'.format(object)) TypeError: <module '__main__' (built-in)> is a built-in module I'd be thankful for any solutions.

    Read the article

  • IDLE wont start Python 2.6.5

    - by anteater7171
    I was using it as my primary text editor for quite sometime. However, one day it just stopped working. This had happened to me several times before, so I simply tried to end all procceses using windows task manager. However that didn't work. I've recently tried getting it to work again. Whenever I try to reopen it it informs me that it's subprocess couldn't connect. I tried uninstalling it and reinstalling it, yet the problem persists. Anyone have any other solutions? Important facts: Windows 7, Python 2.6.5

    Read the article

  • How to IDLE on all folders in Thunderbird 7?

    - by ThiefMaster
    The title pretty much says everything: I'm using server-side filtering so I need Thunderbird to watch all folders for new messages using IDLE. I've already tried enabling "When getting new messages for this account, always check this folder" but after restarting TB I did not have an IMAP IDLE connection open for every folder. I've also tried setting mail.check_all_imap_folders_for_new (which did not exist before) and mail.server.default.check_all_folders_for_new to true - nothing changed.

    Read the article

  • TCP Keepalive and firewall killing idle sessions

    - by Carlos A. Ibarra
    In a customer site, the network team added a firewall between the client and the server. This is causing idle connections to get disconnected after about 40 minutes of idle time. The network people say that the firewall doesn't have any idle connection timeout, but the fact is that the idle connections get broken. In order to get around this, we first configured the server (a Linux machine) with TCP keepalives turned on with tcp_keepalive_time=300, tcp_keepalive_intvl=300, and tcp_keepalive_probes=30000. This works, and the connections stay viable for days or more. However, we would also like the server to detect dead clients and kill the connection, so we changed the settings to time=300,intvl=180,probes=10, thinking that if the client was indeed alive, the server would probe every 300s (5 minutes) and the client would respond with an ACK and that would keep the firewall from seeing this as an idle connection and killing it. If the client was dead, after 10 probes, the server would abort the connection. To our surprise, the idle but alive connections get killed after about 40 minutes as before. Wireshark running on the client side shows no keepalives at all between the server and client, even when keepalives are enabled on the server. What could be happening here? If the keepalive settings on the server are time=300,intvl=180,probes=10, I would expect that if the client is alive but idle, the server would send keepalive probes every 300 seconds and leave the connection alone, and if the client is dead, it would send one after 300 seconds, then 9 more probes every 180 seconds before killing the connection. Am I right? One possibility is that the firewall is somehow intercepting the keepalive probes from the server and failing to pass them on to the client, and the fact that it got a probe makes it think that the connection is active. Is this common behavior for a firewall? We don't know what kind of firewall is involved. The server is a Teradata node and the connection is from a Teradata client utility to the database server, port 1025 on the server side, but we have seen the same problem with an SSH connection so we think it affects all TCP connections.

    Read the article

  • Automatically log off idle Windows 7 console sessions

    - by Josh G
    We have a number of shared computers that users never seem to log out of. Am I correct that there is no built in functionality to automatically log off console sessions after an idle timeout? I've seen two suggestions: a logoff screensaver, and a scheduled task with an idle trigger. Will the idle trigger work if only the session is idle, but the computer is in use with a different session? Is there a better way to go about this? Thanks,

    Read the article

  • 12.04 sound keeps auto-muting when idle

    - by fali
    I just installed 12.04 on an HP8510W. Everything works fine except for one weird behavior which I have noticed. When ever there is no audio playing, the audio mute indicator on the laptop is on. As soon as I start playing a you tube video the mute indicator turns off and I get sound. Here is my pulse audio output which says that the sink is suspended because it is idle: Welcome to PulseAudio! Use "help" for usage information. list-sinks 1 sink(s) available. index: 0 name: <alsa_output.pci-0000_00_1b.0.analog-stereo> driver: <module-alsa-card.c> flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: SUSPENDED suspend cause: IDLE I tried running alsamixer, but I don't see the auto-mute option.

    Read the article

  • Detecting Idle Time with Global Mouse and Keyboard Hooks in WPF

    - by jdanforth
    Years and years ago I wrote this blog post about detecting if the user was idle or active at the keyboard (and mouse) using a global hook. Well that code was for .NET 2.0 and Windows Forms and for some reason I wanted to try the same in WPF and noticed that a few things around the keyboard and mouse hooks didn’t work as expected in the WPF environment. So I had to change a few things and here’s the code for it, working in .NET 4. I took the liberty and refactored a few things while at it and here’s the code now. I’m sure I will need it in the far future as well. using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Irm.Tim.Snapper.Util { public class ClientIdleHandler : IDisposable { public bool IsActive { get; set; } int _hHookKbd; int _hHookMouse; public delegate int HookProc(int nCode, IntPtr wParam, IntPtr lParam); public event HookProc MouseHookProcedure; public event HookProc KbdHookProcedure; //Use this function to install thread-specific hook. [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId); //Call this function to uninstall the hook. [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern bool UnhookWindowsHookEx(int idHook); //Use this function to pass the hook information to next hook procedure in chain. [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern int CallNextHookEx(int idHook, int nCode, IntPtr wParam, IntPtr lParam); //Use this hook to get the module handle, needed for WPF environment [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); public enum HookType : int { GlobalKeyboard = 13, GlobalMouse = 14 } public int MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam) { //user is active, at least with the mouse IsActive = true; Debug.Print("Mouse active"); //just return the next hook return CallNextHookEx(_hHookMouse, nCode, wParam, lParam); } public int KbdHookProc(int nCode, IntPtr wParam, IntPtr lParam) { //user is active, at least with the keyboard IsActive = true; Debug.Print("Keyboard active"); //just return the next hook return CallNextHookEx(_hHookKbd, nCode, wParam, lParam); } public void Start() { using (var currentProcess = Process.GetCurrentProcess()) using (var mainModule = currentProcess.MainModule) { if (_hHookMouse == 0) { // Create an instance of HookProc. MouseHookProcedure = new HookProc(MouseHookProc); // Create an instance of HookProc. KbdHookProcedure = new HookProc(KbdHookProc); //register a global hook _hHookMouse = SetWindowsHookEx((int)HookType.GlobalMouse, MouseHookProcedure, GetModuleHandle(mainModule.ModuleName), 0); if (_hHookMouse == 0) { Close(); throw new ApplicationException("SetWindowsHookEx() failed for the mouse"); } } if (_hHookKbd == 0) { //register a global hook _hHookKbd = SetWindowsHookEx((int)HookType.GlobalKeyboard, KbdHookProcedure, GetModuleHandle(mainModule.ModuleName), 0); if (_hHookKbd == 0) { Close(); throw new ApplicationException("SetWindowsHookEx() failed for the keyboard"); } } } } public void Close() { if (_hHookMouse != 0) { bool ret = UnhookWindowsHookEx(_hHookMouse); if (ret == false) { throw new ApplicationException("UnhookWindowsHookEx() failed for the mouse"); } _hHookMouse = 0; } if (_hHookKbd != 0) { bool ret = UnhookWindowsHookEx(_hHookKbd); if (ret == false) { throw new ApplicationException("UnhookWindowsHookEx() failed for the keyboard"); } _hHookKbd = 0; } } #region IDisposable Members public void Dispose() { if (_hHookMouse != 0 || _hHookKbd != 0) Close(); } #endregion } } The way you use it is quite simple, for example in a WPF application with a simple Window and a TextBlock: <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <TextBlock Name="IdleTextBox"/> </Grid> </Window> And in the code behind we wire up the ClientIdleHandler and a DispatcherTimer that ticks every second: public partial class MainWindow : Window { private DispatcherTimer _dispatcherTimer; private ClientIdleHandler _clientIdleHandler; public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { //start client idle hook _clientIdleHandler = new ClientIdleHandler(); _clientIdleHandler.Start(); //start timer _dispatcherTimer = new DispatcherTimer(); _dispatcherTimer.Tick += TimerTick; _dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 1); _dispatcherTimer.Start(); } private void TimerTick(object sender, EventArgs e) { if (_clientIdleHandler.IsActive) { IdleTextBox.Text = "Active"; //reset IsActive flag _clientIdleHandler.IsActive = false; } else IdleTextBox.Text = "Idle"; } } Remember to reset the ClientIdleHandle IsActive flag after a check.

    Read the article

  • Any way to disable specific CPU idle (Cx) states?

    - by Philippe
    I just got a new Toshiba Tecra S11 notebook, which has a Core i5 520M CPU, and it appears to suffer from a well-known problem: a high pitched noise when the CPU is idle. Googling around revealed that this is caused by a specific power-saving mode in the CPU. In most cases, C4 mode is blamed for the noise. So my question is: is it possible to disable C4 mode (or any other "sleep" mode) using some utility or BIOS setting? I don't mind if it hurts battery life. I'd appreciate any advice on this matter. It's driving me crazy. FYI: I'm running Windows 7 64-bit

    Read the article

  • Getting .py scripts to open up in Python's IDLE

    - by Jahkr
    Hi there, I'm new to Python. I use Python 2.7 and I am running Windows Vista (64-bit). How do I make it when I click on .py scripts... that it opens up in IDLE so I can edit it a snap? Ya know... without having to open IDLE by itself. Heh. I got all the way to C:\Python27\Lib\idlelib but I don't see the IDLE application. Then when I do right-click and "Default open with" and select the idle.bat file.. I get this: Thanks!

    Read the article

  • Ubuntu One using 500 MB memory also when idle

    - by cdysthe
    I'm a Dropbox convert (I hope!), but after having used Ubuntu One for a couple of weeks I notice a few differences from Dropbox. The most glaring difference is that the sync daemon constantly takes 500MB ram on my system (Ubuntu 12.04 x64). It hogs this amount of memory as soon as I log in, does it's initial sync/check but keeps the memory. All in all it seems to me that Ubuntu One uses more system resources than Dropbox. I am syncing the same folders and files with Ubuntu One as I was with Dropbox. Also, afte I log in Ubuntu One grids at 100% CPU for at least five minutes which can be annoying on a laptop, but is not a showstopper. I'm wondering if this is a problem on my system, or if Ubuntu One is expected to use that amount of memory even when idle?

    Read the article

  • Wi-Fi connections gets Idle

    - by marcocamejo
    I am having this terrible problem. I have read a lot of people getting disconnected from the Network, it is not my case, I don't get disconnected, the connection just gets "idle" most of the time. It only works for short periods of time (seconds, a couple of minutes at most), then gets dead, then works again, and so on. It is annoying. I am using Ubuntu 11.10 on a Dell M5030 laptop. I have Windows 7 installed too, and of course with it, the wifi works perfectly. Any idea? advice?

    Read the article

  • External hard-drive is "clicking" when idle [closed]

    - by mirumir
    I'm struggling with a very annoying issue: My new hard-drive (Samsung Spinpoint M8 1TB (HN-M101MBB) was build in an USB 3.0 external case (Lian Li EX-10QR) and formatted with ext4. When this hard-drive is connected to my Notebook via USB 2.0 it "klicks", the LED flashs too, every second, but only when it's idle! It stays silent, when something is copying or reading from it. But when this drive was formatted with ext3 or fat, it always remained silent. This also happens with a Western Digital WD10JPVT Scorpio Blue, but the "klicks" are even louder! System: 12.04 64-bit with Gnome-Shell. Any ideas how to approach this issue?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >