Re: Not Quiting
Ian Mallett wrote: > If I run a program with F5, it works fine, until I try to quit, at > which point the program crashes. You mean if you run it in IDLE using F5? > Oddly enough, running the same program by clicking on its file (i.e. > double click "program.py") the quiting function works! I'd like to > use F5, but I obviously can't. Help, anyone? This is a specific problem that happens on Windows systems when you right-click a file and select 'edit with IDLE.' Basically, if you want IDLE to open its subprocess connection successfully (so that IDLE is not running in the same Python thread as your program and thus hanging when your program does the same) open IDLE from the Start menu, or from a Desktop shortcut. Then open the particular code you're trying to edit and away-you-go. A good indication that the subprocess is working correctly is that you'll see ===================RESTART======================== every time you F5 to run a program. HTH, -Luke P.S. In the future, if you have a question like this, try to give us more info, such as the platform you're running, and the editor you're using.
Re: Not Quiting
"In the future, if you have a question like this, try to give us
more info, such as the platform you're running, and the editor you're using."
I'll try to do that.
Yes, I am running IDLE. Isn't there a way to run the program just by pressing F5 in the program and not doing anything else?
Ian Mallett wrote:
> If I run a program with F5, it works fine, until I try to quit, at
> which point the program crashes.
You mean if you run it in IDLE using F5?
> Oddly enough, running the same program by clicking on its file ( i.e.
> double click "program.py") the quiting function works! I'd like to
> use F5, but I obviously can't. Help, anyone?
This is a specific problem that happens on Windows systems when you
right-click a file and select 'edit with IDLE.'
Basically, if you want IDLE to open its subprocess connection
successfully (so that IDLE is not running in the same Python thread as
your program
and thus hanging when your program does the same) open IDLE from the
Start menu, or from a Desktop shortcut.
Then open the particular code you're trying to edit and away-you-go.
A good indication that the subprocess is working correctly is that
you'll see
===================RESTART========================
every time you F5 to run a program.
HTH,
-Luke
P.S. In the future, if you have a question like this, try to give us
more info, such as the platform you're running, and the editor you're using.
Re: undeliverable messages
Charles Joseph Christie II wrote: > On Friday 29 June 2007 02:23:13 pm Luke Paireepinart wrote: > >> Can an admin remove >> >> <randy@...> >> >> from the mailing list? >> I just keep getting bounces from his address every time I post. >> Thanks, >> -Luke >> > > I just had the same problem a second ago... > So... what would happen if I set up a command on my mailserver to automatically forward messages from this address back to the same address? Would I create an infinite loop and explode the internet? Just curious, -Luke
Re: Not Quiting
Ian Mallett wrote: > "In the future, if you have a question like this, try to give us > more info, such as the platform you're running, and the editor you're > using." > I'll try to do that. > > Yes, I am running IDLE. Isn't there a way to run the program just by > pressing F5 in the program and not doing anything else? Your terminology is confusing the issue. What you're asking, I think, is "isn't there an easy way to execute my program when I am editing the code within IDLE?" Yes, you just use F5. But the _manner in which you open the code in IDLE_ is what determines if a subprocess will be opened. Don't open your code by right-clicking the file and choosing "edit." open IDLE by a shortcut or directly from the directory in which it's installed. Then load your code from there. HTH, -Luke
Re: Not Quiting
So what you're saying is run IDLE separately from my program (don't click on "Edit With IDLE") and doing something. I don't know what you mean- cutting and pasting the program into it? It can't be hitting F5 because that opens a new IDLE window. What DO you mean? Anyway, that seems harder than just
running the program by clicking on its file (i.e. double click "program.py").
Ian Mallett wrote:
> "In the future, if you have a question like this, try to give us
> more info, such as the platform you're running, and the editor you're
> using."
> I'll try to do that.
>
> Yes, I am running IDLE. Isn't there a way to run the program just by
> pressing F5 in the program and not doing anything else?
Your terminology is confusing the issue.
What you're asking, I think, is "isn't there an easy way to execute my
program when I am editing the code within IDLE?"
Yes, you just use F5.
But the _manner in which you open the code in IDLE_ is what determines
if a subprocess will be opened.
Don't open your code by right-clicking the file and choosing "edit."
open IDLE by a shortcut or directly from the directory in which it's
installed.
Then load your code from there.
HTH,
-Luke
Re: Not Quiting
Ian Mallett wrote: > So what you're saying is run IDLE separately from my program (don't > click on "Edit With IDLE") and doing something. I don't know what you > mean- cutting and pasting the program into it? It can't be hitting F5 > because that opens a new IDLE window. What DO you mean? Anyway, that > seems harder than just running the program by clicking on its file > (i.e. double click "program.py"). You open code in IDLE just like you open text documents in every GUI text editor you've ever used. You click on File and then Load, then you browse to the directory of where your file is, and double click it. Once your code is loaded, you can hit F5 to execute it. No, this is not slower, because you do this _once_ when you start editing your program, and from then on , you just execute the code with F5. The only difference than how you're doing it now is that you start IDLE without the right-click. Once you're in IDLE, it works the same as before. You don't have to reload the code every time you want to run it, you just hit F5. -Luke
Re: Not Quiting
I see the ================RESTART================== thing but it still crashes when I try to quit.
Ian Mallett wrote:
> So what you're saying is run IDLE separately from my program (don't
> click on "Edit With IDLE") and doing something. I don't know what you
> mean- cutting and pasting the program into it? It can't be hitting F5
> because that opens a new IDLE window. What DO you mean? Anyway, that
> seems harder than just running the program by clicking on its file
> (i.e. double click "program.py").
You open code in IDLE just like you open text documents in every GUI
text editor you've ever used.
You click on File and then Load, then you browse to the directory of
where your file is, and double click it.
Once your code is loaded, you can hit F5 to execute it.
No, this is not slower, because you do this _once_ when you start
editing your program, and from then on , you just execute the code with F5.
The only difference than how you're doing it now is that you start IDLE
without the right-click.
Once you're in IDLE, it works the same as before.
You don't have to reload the code every time you want to run it, you
just hit F5.
-Luke
Re: Not Quiting
Ian Mallett wrote: > I see the ================RESTART================== thing but it still > crashes when I try to quit. What code are you running, and what do you mean by 'it crashes,' and how are you trying to quit? -Luke > > On 6/30/07, *Luke Paireepinart* < rabidpoobear@... > <mailto:rabidpoobear@...>> wrote: > > Ian Mallett wrote: > > So what you're saying is run IDLE separately from my program (don't > > click on "Edit With IDLE") and doing something. I don't know > what you > > mean- cutting and pasting the program into it? It can't be > hitting F5 > > because that opens a new IDLE window. What DO you > mean? Anyway, that > > seems harder than just running the program by clicking on its file > > (i.e. double click "program.py"). > You open code in IDLE just like you open text documents in every GUI > text editor you've ever used. > You click on File and then Load, then you browse to the directory of > where your file is, and double click it. > > Once your code is loaded, you can hit F5 to execute it. > No, this is not slower, because you do this _once_ when you start > editing your program, and from then on , you just execute the code > with F5. > The only difference than how you're doing it now is that you start > IDLE > without the right-click. > Once you're in IDLE, it works the same as before. > You don't have to reload the code every time you want to run it, you > just hit F5. > -Luke > >
Re: Not Quiting
By code I mean any program that works otherwise, by it crashes I mean I have to quit using the taskmanager and endtask, and by how I quit I mean
keystate = pygame.key.get_pressed()
for event in pygame.event.get():
if event.type == pygame.QUIT or keystate[K_ESCAPE]:
sys.exit()
Ian Mallett wrote:
> I see the ================RESTART================== thing but it still
> crashes when I try to quit.
What code are you running, and what do you mean by 'it crashes,' and how
are you trying to quit?
-Luke
>
> On 6/30/07, *Luke Paireepinart* < rabidpoobear-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> <mailto:rabidpoobear-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote:
>
> Ian Mallett wrote:
> > So what you're saying is run IDLE separately from my program (don't
> > click on "Edit With IDLE") and doing something. I don't know
> what you
> > mean- cutting and pasting the program into it? It can't be
> hitting F5
> > because that opens a new IDLE window. What DO you
> mean? Anyway, that
> > seems harder than just running the program by clicking on its file
> > (i.e. double click " program.py").
> You open code in IDLE just like you open text documents in every GUI
> text editor you've ever used.
> You click on File and then Load, then you browse to the directory of
> where your file is, and double click it.
>
> Once your code is loaded, you can hit F5 to execute it.
> No, this is not slower, because you do this _once_ when you start
> editing your program, and from then on , you just execute the code
> with F5.
> The only difference than how you're doing it now is that you start
> IDLE
> without the right-click.
> Once you're in IDLE, it works the same as before.
> You don't have to reload the code every time you want to run it, you
> just hit F5.
> -Luke
>
>
RSS Feed