Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   python mysteriously halts (http://www.velocityreviews.com/forums/t624191-python-mysteriously-halts.html)

Todd 07-07-2008 01:02 PM

python mysteriously halts
 
Hello everyone,

I ran a python script last night which connects to a matlab automation
server via DCOM (using win32com). I expected to see the results when
I came in this morning. But apparently, not long after I left, python
stopped. I hit enter in the console, and it started again. I scoured
the handful of lines of code to see if there was any kind of input
statement put there by accident but couldn't find one. Furthermore,
I've run this code many times without it pausing. It's still possible
I've done something boneheaded, but I'm wondering if there is another
reason (e.g. a pause in the win32com module, some kind of timeout
feature if the system is idle, etc.). thank you

Peter Otten 07-07-2008 01:31 PM

Re: python mysteriously halts
 
Todd wrote:

> I ran a python script last night which connects to a matlab automation
> server via DCOM (using win32com). I expected to see the results when
> I came in this morning. But apparently, not long after I left, python
> stopped. I hit enter in the console, and it started again. I scoured
> the handful of lines of code to see if there was any kind of input
> statement put there by accident but couldn't find one. Furthermore,
> I've run this code many times without it pausing. It's still possible
> I've done something boneheaded, but I'm wondering if there is another
> reason (e.g. a pause in the win32com module, some kind of timeout
> feature if the system is idle, etc.). thank you


You could start your debugging process by hitting Control-C instead of
<enter> and study the traceback.

Peter


Tim Golden 07-07-2008 02:17 PM

Re: python mysteriously halts
 
Todd wrote:
> I ran a python script last night which connects to a matlab automation
> server via DCOM (using win32com). I expected to see the results when
> I came in this morning. But apparently, not long after I left, python
> stopped. I hit enter in the console, and it started again.


Symptomatically, at least, this can be caused by someone starting to
select (with the mouse) an area of the screen: the process will pause
until <Enter> is pressed, which copies the area to the clipboard. This
only happens with a console window, but it sounds like that's what
you had running.

TJG

goldfita@gmail.com 07-07-2008 03:22 PM

Re: python mysteriously halts
 
On Jul 7, 10:17*am, Tim Golden <m...@timgolden.me.uk> wrote:
> Todd wrote:
> > I ran a python script last night which connects to a matlab automation
> > server via DCOM (using win32com). *I expected to see the results when
> > I came in this morning. *But apparently, not long after I left, python
> > stopped. *I hit enter in the console, and it started again.

>
> Symptomatically, at least, this can be caused by someone starting to
> select (with the mouse) an area of the screen: the process will pause
> until <Enter> is pressed, which copies the area to the clipboard. This
> only happens with a console window, but it sounds like that's what
> you had running.
>
> TJG


That might be it, although I don't recall doing that. Fortunately/
unfortunately, it happened a few times, but it seems to have stopped
now.

Todd 07-07-2008 03:26 PM

Re: python mysteriously halts
 
On Jul 7, 10:17*am, Tim Golden <m...@timgolden.me.uk> wrote:
> Todd wrote:
> > I ran a python script last night which connects to a matlab automation
> > server via DCOM (using win32com). *I expected to see the results when
> > I came in this morning. *But apparently, not long after I left, python
> > stopped. *I hit enter in the console, and it started again.

>
> Symptomatically, at least, this can be caused by someone starting to
> select (with the mouse) an area of the screen: the process will pause
> until <Enter> is pressed, which copies the area to the clipboard. This
> only happens with a console window, but it sounds like that's what
> you had running.
>
> TJG


That might be it, although I don't recall doing that. Fortunately/
unfortunately, it happened a few times, but it seems to have stopped
now.

Gabriel Genellina 07-15-2008 07:34 AM

Re: python mysteriously halts
 
En Mon, 07 Jul 2008 12:26:28 -0300, Todd <goldfita@signalsguru.net>
escribió:

> On Jul 7, 10:17*am, Tim Golden <m...@timgolden.me.uk> wrote:
>> Todd wrote:
>> > I ran a python script last night which connects to a matlab automation
>> > server via DCOM (using win32com). *I expected to see the results when
>> > I came in this morning. *But apparently, not long after I left, python
>> > stopped. *I hit enter in the console, and it started again.

>>
>> Symptomatically, at least, this can be caused by someone starting to
>> select (with the mouse) an area of the screen: the process will pause
>> until <Enter> is pressed, which copies the area to the clipboard. This
>> only happens with a console window, but it sounds like that's what
>> you had running.

>
> That might be it, although I don't recall doing that. Fortunately/
> unfortunately, it happened a few times, but it seems to have stopped
> now.


You could disable that behaviour by unchecking "Quick edit mode" (or
something like that) in the Default preferences for the console window.
(It's unchecked by default on WinXP and Win2003, I think).

--
Gabriel Genellina



All times are GMT. The time now is 08:58 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.