huey.y.ji...@gmail.com wrote:
> Hi Folks,
>
> I need to run an infinite loop on a Menu button, like this:
>
> from Tkinter import *
>
> def run_job():
> i = 0
> while 1:
> i = i + 1
> if i > 100:
> break
> .
On 03/12/2018 08:58, huey.y.ji...@gmail.com wrote:
> Hi Folks,
>
> I need to run an infinite loop on a Menu button, like this:
>
> from Tkinter import *
>
> def run_job():
> i = 0
> while 1:
> i = i + 1
> if i > 100:
>
Hi Folks,
I need to run an infinite loop on a Menu button, like this:
from Tkinter import *
def run_job():
i = 0
while 1:
i = i + 1
if i > 100:
break
...
root = Tk()
menu = Menu(root)
root.config(menu=menu)
filemenu = Menu(menu)
menu.add_casc
Robin Becker writes:
> A user reported an infinite loop in reportlab. I determined a possible
> cause and fix and would like to test for absence of the loop. Is there
> any way to check for presence/absence of an infinite loop in python? I
> imagine we could do something like call
On 17Jul2018 12:39, Robin Becker wrote:
On 17/07/2018 12:16, Cameron Simpson wrote:
On 17Jul2018 10:10, Robin Becker wrote:
A user reported an infinite loop in reportlab. I determined a
possible cause and fix and would like to test for absence of the
loop. Is there any way to check for
) # Former infinite loop
I assume that your test runner has some time limit at some level of
granularity. You may be able to add a timeout for a particular test.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 17 Jul 2018 10:10:49 +0100, Robin Becker wrote:
> A user reported an infinite loop in reportlab. I determined a possible
> cause and fix and would like to test for absence of the loop. Is there
> any way to check for presence/absence of an infinite loop in python? I
> imagine
On Tue, 17 Jul 2018 10:10:49 +0100, Robin Becker wrote:
> A user reported an infinite loop in reportlab. I determined a possible
> cause and fix and would like to test for absence of the loop. Is there
> any way to check for presence/absence of an infinite loop in python? I
> imagine
On 17/07/2018 12:16, Cameron Simpson wrote:
On 17Jul2018 10:10, Robin Becker wrote:
A user reported an infinite loop in reportlab. I determined a possible cause and fix and would like to test for absence of the
loop. Is there any way to check for presence/absence of an infinite loop in python
On 17Jul2018 10:10, Robin Becker wrote:
A user reported an infinite loop in reportlab. I determined a possible
cause and fix and would like to test for absence of the loop. Is there
any way to check for presence/absence of an infinite loop in python? I
imagine we could do something like call
On 17/07/2018 10:32, Chris Angelico wrote:
..
All you gotta do is solve the halting problem...
https://en.wikipedia.org/wiki/Halting_problem
ChrisA
ah so it's easy :)
--
Robin Becker
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 17, 2018 at 7:10 PM, Robin Becker wrote:
> A user reported an infinite loop in reportlab. I determined a possible cause
> and fix and would like to test for absence of the loop. Is there any way to
> check for presence/absence of an infinite loop in python? I imagine we c
A user reported an infinite loop in reportlab. I determined a possible cause and fix and would like to test for absence of the
loop. Is there any way to check for presence/absence of an infinite loop in python? I imagine we could do something like call an
external process and see if it takes too
s the program but the menu of the program
i'm calling goes into an infinite loop..the offending code seems
to be in the button1Click module.
Any help is greatly appreciated.
You say "the menu *of the program i'm calling* goes into an infinite
loop" (my emphasis), so per
m i'm calling goes into an infinite
loop..the offending code seems to be in the button1Click module.
Any help is greatly appreciated.
Thanks
from Tkinter import *
import os, sys
from win32com.client import Dispatch
xlApp=Dispatch('Excel.Application')
_PSSBINPATH=r"C:\Progra
On 12/22/11 11:24 AM, Robert Kern wrote:
Just as a further note on these lines, when older versions of setuptools and
distribute install scripts, they generate stub scripts that do not use a
__main__ guard, so installing a multiprocessing-using application with
setuptools can cause this problem.
ain module such that it can properly locate the
rest of the code to start. If you do not guard the spawning code with a __main__
test, then this import will cause an infinite loop.
Just as a further note on these lines, when older versions of setuptools and
distribute install scripts, they gen
On 21/12/11 21:11:03, Andrew Berg wrote:
On 12/21/2011 1:29 PM, Ethan Furman wrote:
Anything that runs at import time should be protected by the `if
__name__ == '__main__'` idiom as the children will import the __main__
module.
So the child imports the parent and runs the spawn code again? That
On 12/21/2011 1:29 PM, Ethan Furman wrote:
> Anything that runs at import time should be protected by the `if
> __name__ == '__main__'` idiom as the children will import the __main__
> module.
So the child imports the parent and runs the spawn code again? That
makes sense.
--
CPython 3.2.2 | Wi
Andrew Berg wrote:
I am trying to understand the multiprocessing module, and I tried some
simple code:
import multiprocessing
def f():
print('bla bla')
p = multiprocessing.Process(target=f)
p.start()
p.join()
And the result is a new process that spawns a new process that spawns a
new pr
On 21 December 2011 18:59, Andrew Berg wrote:
> I am trying to understand the multiprocessing module, and I tried some
> simple code:
>
> import multiprocessing
> def f():
>print('bla bla')
> p = multiprocessing.Process(target=f)
> p.start()
> p.join()
>
> And the result is a new process
On 12/21/2011 1:07 PM, Joshua Landau wrote:
> Eh? It works for me. Python 3.2 + 2.7
> Is this the full code?
That is the full code.
--
CPython 3.2.2 | Windows NT 6.1.7601.17640 | Thunderbird 7.0
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to understand the multiprocessing module, and I tried some
simple code:
import multiprocessing
def f():
print('bla bla')
p = multiprocessing.Process(target=f)
p.start()
p.join()
And the result is a new process that spawns a new process that spawns a
new process ad infinitum un
On 9/29/2010 4:59 AM, harryos wrote:
hi
I am trying to write a program to read data from a site url.
The program must read the data from site every 5 minutes.
def get_data_from_site(pageurlstr):
h=urllib.urlopen(pageurlstr)
data=h.read()
process_data(data)
A key point here is
harryos wrote
Here is a technique that allows the loop to run in the background, in its
own thread, leaving the main program to do other processing -
import threading
class DataGetter(threading.Thread):
thanks Frank
A pleasure.
I left out a line that will usually be desirable.
At the e
thanks Frank
>
> Here is a technique that allows the loop to run in the background, in its
> own thread, leaving the main program to do other processing -
>
> import threading
>
> class DataGetter(threading.Thread):
>
--
http://mail.python.org/mailman/listinfo/python-list
,but then it doesn't
look right adding so many scheduler.enter() statements.The program is
supposed to execute the above function every
5 minutes until the application is shut down by the user.
I created an infinite loop
while True:
print time.asctime()
get_data_from_site(
d to execute the above function every
> 5 minutes until the application is shut down by the user.
>
> I created an infinite loop
> while True:
>print time.asctime()
>get_data_from_site('http://somesite.com/')
>time.sleep(300)
>
> Is there a b
doesn't
look right adding so many scheduler.enter() statements.The program is
supposed to execute the above function every
5 minutes until the application is shut down by the user.
I created an infinite loop
while True:
print time.asctime()
get_data_from_site('http://so
I am starting pdb.pm() in an embedded, multithreaded python PyCrust
shell (wx toolkit) -- but other than that it's COMPLETELY
vanilla :-)) and pdb is getting stuck in an infinite loop, sucking
down all CPU. I never get the pdb prompt. Anyone have any experience
with this? I'm pre
Try Ctrl + Break
http://tinyurl.com/qc8np
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
I'm using python-mode in emacs.
I happened to execute the code that contains an infinite loop.
The system is hung and it doesn't stop at all. lol
How do I manually stop it in emacs?
For Eclipse, in java programming, if i happen to fall into an infinite
loop, i could juse press
loop should run, and then put an outer limit on it, so that it will run
normally as long as it doesn't exceed x, after which it breaks and
says, "Hey, Dummy, you were headed into an infinite loop."
Could be a good exercise.
Thank you again.
rick
--
http://mail.python.org/mailman/listinfo/python-list
zweistein wrote:
> Try CTRL + C. If it doesn't work, CTRL + Pause/Break should also work
> (if you're running it from the CLI).
>
> HTH
>
Note: this will raise a KeyboardInterrupt exception, which you might
inadvertently be catching. If you have been lazy and written:
try:
ex
Thank you, both. I'll put in on a sticky!
rick
--
http://mail.python.org/mailman/listinfo/python-list
BartlebyScrivener wrote:
> Running Python on Win XP.
>
> When running commands with the interpreter, if you get stuck in a while
> loop, is there a keyboard command to break out of it?
>
> Or is the only way out a triple-finger salute and End Task?
>
> rd
ctrl+c
or ctrl+c+enter
--
http://ma
Try CTRL + C. If it doesn't work, CTRL + Pause/Break should also work
(if you're running it from the CLI).
HTH
--
http://mail.python.org/mailman/listinfo/python-list
Running Python on Win XP.
When running commands with the interpreter, if you get stuck in a while
loop, is there a keyboard command to break out of it?
Or is the only way out a triple-finger salute and End Task?
rd
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
LOPEZ GARCIA DE LOMANA, ADRIAN wrote:
> Hi all,
>
> I have a question with some code I'm writting:
>
>
> def main():
>
> if option == 1:
>
> function_a()
>
> elif option == 2:
>
> function_b()
>
> else:
>
> raise 'option has to be either 1 or 2'
>
else:
> raise 'option has to be either 1 or 2'
> if iteration == True:
> main()
[...]
> I want an infinite loop, but after some iterations (996) it breaks:
Since no one else mentioend it: this is only iteration in languages
which mandate tail recursion elimin
; > print 'hello from function a'
> >
> > return None
> >
> > def function_b():
> >
> > print 'hello from function b'
> >
> > return None
> >
> > iteration = True
> >
> > option = 1
> >
&
on has to be either 1 or 2'
> if iteration == True:
> main()
> ... I want an infinite loop, but after some iterations (996) it breaks:
> ... RuntimeError: maximum recursion depth exceeded
>
>
> I don't understand it. Why am I not allowed to iterate infinite
; raise 'option has to be either 1 or 2'
>
> if iteration == True:
>
> main()
>
> def function_a():
>
> print 'hello from function a'
>
> return None
>
> def function_b():
>
> print 'hello from function
print 'hello from function a'
return None
def function_b():
print 'hello from function b'
return None
iteration = True
option = 1
main()
I want an infinite loop, but after some iterations (996) it breaks:
[EMAIL PROTECTED] tmp]$ python test.py
hello fr
44 matches
Mail list logo