Re: Keeping the Console Open with IDLE

2012-07-15 Thread rantingrickjohnson
On Friday, February 20, 2009 9:41:42 AM UTC-6, David Smith wrote:

 What I meant was open open the command prompt, type cd, space, DO NOT
 hit enter yet.  Drag the folder with your script into the command prompt
 window.  Then go to the command prompt window and hit enter.  This
 should compose a command similar to the following:

And why the hell would you resort to such contrived contortions as that? Are 
you masochistic? DoubleClicking an icon will take me less that one second. How 
long does this sequence take:

 1. Open a command prompt
 2. type c
 3. type d
 4. type space
 5. hover over the folder icon with your mouse
 5.5. Oops, i missed. Go back to step 5!
 6. Mouse click the file icon
 7. Mouse drag the file icon
 8. Position the mouse over prompt window
 9. Release the icon 
10. Press the Enter key

Can anybody say !Ay, caramba!? 

Besides, you can skip most of those steps by Shift+RightClicking the file icon 
and choosing Open Command Window Here. But, why the hell would you EVEN do 
that when two simple clicks will suffice?

practicality beats purity



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2012-07-15 Thread Chris Angelico
On Mon, Jul 16, 2012 at 1:35 AM,  rantingrickjohn...@gmail.com wrote:
 Besides, you can skip most of those steps by Shift+RightClicking the file 
 icon and choosing Open Command Window Here.

That's not standard. Me, I can invoke git bash anywhere I want it, but
that doesn't mean I'd recommend installing git just so that people can
get command lines with less steps.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2012-07-15 Thread Rick Johnson
On Sunday, July 15, 2012 10:57:00 AM UTC-5, Chris Angelico wrote:
 On Mon, Jul 16, 2012 at 1:35 AM,  rantingrickjohn...@gmail.com wrote:
  Besides, you can skip most of those steps by Shift+RightClicking
  the file icon and choosing Open Command Window Here.

 That's not standard. Me, I can invoke git bash anywhere I want it, but
 that doesn't mean I'd recommend installing git just so that people can
 get command lines with less steps.

I don't understand Chris? It's obvious that the OP is on a windows box; for 
which no installation is required. 

And, what is so egregious about less steps(sic)? Do you prefer to be 
unproductive? Did you forget the lazy programmers creed? Is your employer 
paying you by the hour? ...all good questions.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2012-07-15 Thread Chris Angelico
On Mon, Jul 16, 2012 at 2:19 AM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
 On Sunday, July 15, 2012 10:57:00 AM UTC-5, Chris Angelico wrote:
 On Mon, Jul 16, 2012 at 1:35 AM,  rantingrickjohn...@gmail.com wrote:
  Besides, you can skip most of those steps by Shift+RightClicking
  the file icon and choosing Open Command Window Here.

 That's not standard. Me, I can invoke git bash anywhere I want it, but
 that doesn't mean I'd recommend installing git just so that people can
 get command lines with less steps.

 I don't understand Chris? It's obvious that the OP is on a windows box; for 
 which no installation is required.

I have here a Windows XP system (shh, it doesn't know there's Linux
between it and the hardware) which has no such context-menu item. Ergo
it is not standard and cannot be assumed to be on the target computer,
and installation IS required.

 And, what is so egregious about less steps(sic)? Do you prefer to be 
 unproductive? Did you forget the lazy programmers creed? Is your employer 
 paying you by the hour? ...all good questions.

And if you're going to quibble about fewer steps then you should
probably have an apostrophe in lazy programmers' creed. Just sayin'.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2012-07-14 Thread rantingrickjohnson
On Thursday, February 19, 2009 10:06:42 PM UTC-6, W. eWatson wrote:
 I'm using IDLE for editing, but execute programs directly. If there are 
 execution or compile errors, the console closes before I can see what it 
 contains. How do I prevent that?

Q: If you are in fact using IDLE to edit your code file, then why not just 
run the files directly from the IDLE menu (Menu-Run-Run Module)? If you 
select this command, IDLE will display a shell window containing all the stdout 
and stderr messages. I think this would be the easiest approach for a neophyte 
administrator like yourself. See this tutorial for more info: 

   https://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html

There are many methods of executing a python script. Using the IDLE run 
command is just one of them. Some others include:

1. Double clicking the file icon in a file browser
2. Typing the full path of the script into a windows Command Prompt. 
Considering i have a script in my C drive named foo.py, i could type the 
command C:\foo.py to execute the script from a windows command prompt.

But my fingers don't need any exercise, so i just double click the icon or use 
the run command of my IDE. Done deal.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2012-07-13 Thread summerholidaylearning
On Friday, February 20, 2009 4:06:42 AM UTC, W. eWatson wrote:
 I#39;m using IDLE for editing, but execute programs directly. If there are 
 execution or quot;compilequot; errors, the console closes before I can see 
 what it 
 contains. How do I prevent that?
 -- 
 W. eWatson
 
   (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site:  39° 15#39; 7quot; N, 121° 2#39; 32quot; W, 2700 
 feet
 
  Web Page: lt;www.speckledwithstars.net/gt;

Thanks this solved my problem too(the same issue - I was also double clicking 
instead of right clicking - edit with IDLE - F5 to run)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2012-07-13 Thread Rodrick Brown
I think you can use pythonw.exe which will read stdin and for any
input before closing.

(I read this a while back, ma guy here.)

Sent from my iPhone

On Jul 13, 2012, at 7:27 AM, summerholidaylearn...@gmail.com
summerholidaylearn...@gmail.com wrote:

 On Friday, February 20, 2009 4:06:42 AM UTC, W. eWatson wrote:
 I#39;m using IDLE for editing, but execute programs directly. If there are
 execution or quot;compilequot; errors, the console closes before I can see 
 what it
 contains. How do I prevent that?
 --
W. eWatson

  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15#39; 7quot; N, 121° 2#39; 32quot; W, 2700 
 feet

 Web Page: lt;www.speckledwithstars.net/gt;

 Thanks this solved my problem too(the same issue - I was also double clicking 
 instead of right clicking - edit with IDLE - F5 to run)
 --
 http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

Matimus wrote:

On Feb 19, 8:06 pm, W. eWatson notval...@sbcglobal.net wrote:

I'm using IDLE for editing, but execute programs directly. If there are
execution or compile errors, the console closes before I can see what it
contains. How do I prevent that?
--
W. eWatson

  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

 Web Page: www.speckledwithstars.net/


Open a console window and type in the name of the script rather than
just double clicking on it. Or, you can terminate your script with a
'raw_input(press enter to quit)'.

Matt
I can open the Python command line from Start, but how do I navigate to the 
folder where the program is?


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread David Smith
W. eWatson wrote:
 Matimus wrote:
 On Feb 19, 8:06 pm, W. eWatson notval...@sbcglobal.net wrote:
 I'm using IDLE for editing, but execute programs directly. If there are
 execution or compile errors, the console closes before I can see
 what it
 contains. How do I prevent that?
 -- 
 W. eWatson

   (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

  Web Page: www.speckledwithstars.net/

 Open a console window and type in the name of the script rather than
 just double clicking on it. Or, you can terminate your script with a
 'raw_input(press enter to quit)'.

 Matt
 I can open the Python command line from Start, but how do I navigate to
 the folder where the program is?
 

I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do with a
command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Brian Blais

On Feb 19, 2009, at 23:06 , W. eWatson wrote:


I'm using IDLE for editing, but execute programs directly.


Is there a reason you are executing them directly?  Why not just run  
the script from IDLE with Run/Run Module (F5) until you are sure  
there are no errors?  You can follow the advice already posted, by  
running it directly from the commandline.  Another hack is to put:


x=raw_input(pausing...)

at the end of your script, but this is really a hack and it would be  
better to use a different solution.



bb

--
Brian Blais
bbl...@bryant.edu
http://web.bryant.edu/~bblais



--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson




I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do with a
command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title of the 
black background window I have up with a  prompt shown in it is 
Python(command line). Maybe this isn't the real Python console window?


What I want is that if I execute the program by double clicking on its name 
to display the console window with the program or syntax errors shown 
without it closing in a split second. Putting read_raw in it doesn't work, 
since some error prevents it from ever being seen.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Catherine Heathcote

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do with a
command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title of 
the black background window I have up with a  prompt shown in it is 
Python(command line). Maybe this isn't the real Python console window?


What I want is that if I execute the program by double clicking on its 
name to display the console window with the program or syntax errors 
shown without it closing in a split second. Putting read_raw in it 
doesn't work, since some error prevents it from ever being seen.




you need to open a dos prompt before doing the steps above. Go to 
start-run and hit cmd enter without the quotes.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do with a
command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title of 
the black background window I have up with a  prompt shown in it is 
Python(command line). Maybe this isn't the real Python console window?


What I want is that if I execute the program by double clicking on its 
name to display the console window with the program or syntax errors 
shown without it closing in a split second. Putting read_raw in it 
doesn't work, since some error prevents it from ever being seen.


Whoa! What's going on here? I just looked at About IDLE, and it shows 1.2.2, 
but yet the second edition of Learning Python talks about going to 2.3 as 
the book is about to go to press, 2004. I thought IDLE came bundled with 
Python. I have Py 2.5. 1.2.2??? Puzzled.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 12:05:08 -0200, W. eWatson notval...@sbcglobal.net  
escribió:


Whoa! What's going on here? I just looked at About IDLE, and it shows  
1.2.2, but yet the second edition of Learning Python talks about going  
to 2.3 as the book is about to go to press, 2004. I thought IDLE came  
bundled with Python. I have Py 2.5. 1.2.2??? Puzzled.


IDLE is a separate product; the version of IDLE that comes with Python  
2.5.4 is 1.2.4


--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

Gabriel Genellina wrote:
En Fri, 20 Feb 2009 12:05:08 -0200, W. eWatson notval...@sbcglobal.net 
escribió:


Whoa! What's going on here? I just looked at About IDLE, and it shows 
1.2.2, but yet the second edition of Learning Python talks about going 
to 2.3 as the book is about to go to press, 2004. I thought IDLE came 
bundled with Python. I have Py 2.5. 1.2.2??? Puzzled.


IDLE is a separate product; the version of IDLE that comes with Python 
2.5.4 is 1.2.4



Where do I get 2.x.x, or the latest?

--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

Catherine Heathcote wrote:

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do with a
command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title 
of the black background window I have up with a  prompt shown in it 
is Python(command line). Maybe this isn't the real Python console 
window?


What I want is that if I execute the program by double clicking on its 
name to display the console window with the program or syntax errors 
shown without it closing in a split second. Putting read_raw in it 
doesn't work, since some error prevents it from ever being seen.




you need to open a dos prompt before doing the steps above. Go to 
start-run and hit cmd enter without the quotes.
Something is amiss here. There's the MS Command Prompt, which I'm looking at 
right now. Yes, it has cd, and so on. I'm also looking at the Python command 
line window. It allow one to run interactively.


If I write a simple python program with just raw_input, by clicking on the 
file name, I get a window with the the title \Python25\pythonexe that 
shows the prompt. If I deliberately put a syntax error in the program, and 
run it by clicking the file, then A window appears and disappears so quickly 
that I have no idea what it said. How do I keep that window up?


Which, if any, of these is the real Python console? What is the window 
called in the example I gave with raw_input?


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Catherine Heathcote

W. eWatson wrote:

Catherine Heathcote wrote:

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do 
with a

command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window 
(w/o

the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title 
of the black background window I have up with a  prompt shown in 
it is Python(command line). Maybe this isn't the real Python 
console window?


What I want is that if I execute the program by double clicking on 
its name to display the console window with the program or syntax 
errors shown without it closing in a split second. Putting read_raw 
in it doesn't work, since some error prevents it from ever being seen.




you need to open a dos prompt before doing the steps above. Go to 
start-run and hit cmd enter without the quotes.
Something is amiss here. There's the MS Command Prompt, which I'm 
looking at right now. Yes, it has cd, and so on. I'm also looking at the 
Python command line window. It allow one to run interactively.


If I write a simple python program with just raw_input, by clicking on 
the file name, I get a window with the the title \Python25\pythonexe 
that shows the prompt. If I deliberately put a syntax error in the 
program, and run it by clicking the file, then A window appears and 
disappears so quickly that I have no idea what it said. How do I keep 
that window up?


Which, if any, of these is the real Python console? What is the window 
called in the example I gave with raw_input?




Run the program from within the MS command line, not by double clicking it.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 12:29:35 -0200, W. eWatson notval...@sbcglobal.net  
escribió:



Gabriel Genellina wrote:
En Fri, 20 Feb 2009 12:05:08 -0200, W. eWatson  
notval...@sbcglobal.net escribió:


Whoa! What's going on here? I just looked at About IDLE, and it shows  
1.2.2, but yet the second edition of Learning Python talks about going  
to 2.3 as the book is about to go to press, 2004. I thought IDLE came  
bundled with Python. I have Py 2.5. 1.2.2??? Puzzled.
 IDLE is a separate product; the version of IDLE that comes with Python  
2.5.4 is 1.2.4



Where do I get 2.x.x, or the latest?


You may update your Python version to 2.5.4 (the latest release in the 2.5  
series).  Then IDLE will report 1.2.4.  They are separate products, their  
version numbers are uncorrelated.


--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 12:39:14 -0200, W. eWatson notval...@sbcglobal.net  
escribió:

Catherine Heathcote wrote:


 you need to open a dos prompt before doing the steps above. Go to  
start-run and hit cmd enter without the quotes.
Something is amiss here. There's the MS Command Prompt, which I'm  
looking at right now. Yes, it has cd, and so on. I'm also looking at the  
Python command line window. It allow one to run interactively.


Open a command prompt (CMD, Console), that black window you were  
looking at.
Use the cd command to change directory to wherever your Python script is  
saved.
Execute python -V (without the quotes). You should get a response,  
including the Python version number. If you get an error like command not  
found or similar, you'll have to use the whole path to python.exe -- try  
with c:\python25\python -V (again, no quotes).

Once you know how to launch Python, you can:

a) Enter the interactive interpreter: Just launch Python as above but  
without the -V argument. The prompt is now 
You can type Python expressions and the interpreter evaluates them. You  
type 2+3, the interpreter answers 5; you type len(abc), the interpreter  
answers 3...


b) Or, from the command prompt, you can execute a script by launching  
Python the same way as above, passing the script name as an argument:


c:\foopython script_name.py

This is what you were looking for - in case of syntax errors or something,  
you can see the output on the console. It stays open because it was open  
*before* you launched Python. Just keep the window open.


See http://docs.python.org/using/windows.html for more info. If Python  
doesn't start just by typing python, you may want to set your PATH  
environment variable as described there.


--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

Catherine Heathcote wrote:

W. eWatson wrote:

Catherine Heathcote wrote:

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec 
comment --
I suppose there are people in the world who don't know what to do 
with a

command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window 
(w/o

the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title 
of the black background window I have up with a  prompt shown in 
it is Python(command line). Maybe this isn't the real Python 
console window?


What I want is that if I execute the program by double clicking on 
its name to display the console window with the program or syntax 
errors shown without it closing in a split second. Putting read_raw 
in it doesn't work, since some error prevents it from ever being seen.




you need to open a dos prompt before doing the steps above. Go to 
start-run and hit cmd enter without the quotes.
Something is amiss here. There's the MS Command Prompt, which I'm 
looking at right now. Yes, it has cd, and so on. I'm also looking at 
the Python command line window. It allow one to run interactively.


If I write a simple python program with just raw_input, by clicking on 
the file name, I get a window with the the title \Python25\pythonexe 
that shows the prompt. If I deliberately put a syntax error in the 
program, and run it by clicking the file, then A window appears and 
disappears so quickly that I have no idea what it said. How do I keep 
that window up?


Which, if any, of these is the real Python console? What is the window 
called in the example I gave with raw_input?




Run the program from within the MS command line, not by double clicking it.
Shirley, you jest? DOS? To do this? How ugly. I barely recall the DOS 
commands. I get to drill my way down 4 levels of folders. What DOS cmd 
allows one to list only folders?


Still, why would one design a window that disappears, when it has useful 
data in it? I see that if I click on the window, it has properties, width, 
height, etc.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

Gabriel Genellina wrote:
En Fri, 20 Feb 2009 12:29:35 -0200, W. eWatson notval...@sbcglobal.net 
escribió:



Gabriel Genellina wrote:
En Fri, 20 Feb 2009 12:05:08 -0200, W. eWatson 
notval...@sbcglobal.net escribió:


Whoa! What's going on here? I just looked at About IDLE, and it 
shows 1.2.2, but yet the second edition of Learning Python talks 
about going to 2.3 as the book is about to go to press, 2004. I 
thought IDLE came bundled with Python. I have Py 2.5. 1.2.2??? Puzzled.
 IDLE is a separate product; the version of IDLE that comes with 
Python 2.5.4 is 1.2.4



Where do I get 2.x.x, or the latest?


You may update your Python version to 2.5.4 (the latest release in the 
2.5 series).  Then IDLE will report 1.2.4.  They are separate products, 
their version numbers are uncorrelated.



Ah, I see, the book is referring to version 2.3 of Python and not IDLE.

--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread David Smith
W. eWatson wrote:
 

 I'm not sure whether I should feel old or write a smart alec comment --
 I suppose there are people in the world who don't know what to do with a
 command prompt

 Assuming a Windows system:

 2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
 the single quote characters)
 3. Drag/drop the folder containing your python script to your command
 prompt window
 4. Hit enter in your command prompt window.
 5. Type python my_script_name.py to execute my_script_name.py.

 --David
 If I enter just cd, then it tells me cd is not defined. If I enter
 c:/python25, it tells me I have a syntax error at c in c:. The title of
 the black background window I have up with a  prompt shown in it is
 Python(command line). Maybe this isn't the real Python console window?
 
 What I want is that if I execute the program by double clicking on its
 name to display the console window with the program or syntax errors
 shown without it closing in a split second. Putting read_raw in it
 doesn't work, since some error prevents it from ever being seen.
 

What I meant was open open the command prompt, type cd, space, DO NOT
hit enter yet.  Drag the folder with your script into the command prompt
window.  Then go to the command prompt window and hit enter.  This
should compose a command similar to the following:

C:\Documents and Settings\user cd C:\Documents and Settings\user\My
Documents\My Project

C:\Documents and Settings\user\My Documents\My Project _

--David
--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Catherine Heathcote

W. eWatson wrote:

Catherine Heathcote wrote:

W. eWatson wrote:

Catherine Heathcote wrote:

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec 
comment --
I suppose there are people in the world who don't know what to do 
with a

command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt 
window (w/o

the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The 
title of the black background window I have up with a  prompt 
shown in it is Python(command line). Maybe this isn't the real 
Python console window?


What I want is that if I execute the program by double clicking on 
its name to display the console window with the program or syntax 
errors shown without it closing in a split second. Putting read_raw 
in it doesn't work, since some error prevents it from ever being seen.




you need to open a dos prompt before doing the steps above. Go to 
start-run and hit cmd enter without the quotes.
Something is amiss here. There's the MS Command Prompt, which I'm 
looking at right now. Yes, it has cd, and so on. I'm also looking at 
the Python command line window. It allow one to run interactively.


If I write a simple python program with just raw_input, by clicking 
on the file name, I get a window with the the title 
\Python25\pythonexe that shows the prompt. If I deliberately put a 
syntax error in the program, and run it by clicking the file, then A 
window appears and disappears so quickly that I have no idea what it 
said. How do I keep that window up?


Which, if any, of these is the real Python console? What is the 
window called in the example I gave with raw_input?




Run the program from within the MS command line, not by double 
clicking it.
Shirley, you jest? DOS? To do this? How ugly. I barely recall the DOS 
commands. I get to drill my way down 4 levels of folders. What DOS cmd 
allows one to list only folders?


Still, why would one design a window that disappears, when it has useful 
data in it? I see that if I click on the window, it has properties, 
width, height, etc.




Thats programming. Whaterver the language, you will need to be 
comfortable with the CLI of your operating system.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

David Smith wrote:

W. eWatson wrote:

I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do with a
command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window (w/o
the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David

If I enter just cd, then it tells me cd is not defined. If I enter
c:/python25, it tells me I have a syntax error at c in c:. The title of
the black background window I have up with a  prompt shown in it is
Python(command line). Maybe this isn't the real Python console window?

What I want is that if I execute the program by double clicking on its
name to display the console window with the program or syntax errors
shown without it closing in a split second. Putting read_raw in it
doesn't work, since some error prevents it from ever being seen.



What I meant was open open the command prompt, type cd, space, DO NOT
hit enter yet.  Drag the folder with your script into the command prompt
window.  Then go to the command prompt window and hit enter.  This
should compose a command similar to the following:

C:\Documents and Settings\user cd C:\Documents and Settings\user\My
Documents\My Project

C:\Documents and Settings\user\My Documents\My Project _

--David
Ah, I thought I'd be clever and do a copy on the path name in the address 
area at the top of the folder. That doesn't work. I'm quite surprised though 
that one can do the drag as you say. But, hey, it works. Thanks. I wonder 
what else non-DOS things can be done in it?


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 13:37:06 -0200, W. eWatson notval...@sbcglobal.net  
escribió:

Catherine Heathcote wrote:

W. eWatson wrote:


 Run the program from within the MS command line, not by double  
clicking it.
Shirley, you jest? DOS? To do this? How ugly. I barely recall the DOS  
commands. I get to drill my way down 4 levels of folders. What DOS cmd  
allows one to list only folders?


After executing these two commands, pressing TAB will auto-complete  
matching filenames/directories:


reg add HKLM\Software\Microsoft\Command Processor /v CompletionChar /t  
REG_DWORD /d 9


reg add HKLM\Software\Microsoft\Command Processor /v PathCompletionChar  
/t REG_DWORD /d 9


(Overwrite the previous value, if exists). This is a global change and the  
logged on user must have administrative rights to modify the registry.  
Unprivileged users must use HKCU instead of HKLM.


--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread MRAB

Catherine Heathcote wrote:

W. eWatson wrote:

Catherine Heathcote wrote:

W. eWatson wrote:




I'm not sure whether I should feel old or write a smart alec 
comment --
I suppose there are people in the world who don't know what to do 
with a

command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window 
(w/o

the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David
If I enter just cd, then it tells me cd is not defined. If I enter 
c:/python25, it tells me I have a syntax error at c in c:. The title 
of the black background window I have up with a  prompt shown in 
it is Python(command line). Maybe this isn't the real Python 
console window?


What I want is that if I execute the program by double clicking on 
its name to display the console window with the program or syntax 
errors shown without it closing in a split second. Putting read_raw 
in it doesn't work, since some error prevents it from ever being seen.




you need to open a dos prompt before doing the steps above. Go to 
start-run and hit cmd enter without the quotes.
Something is amiss here. There's the MS Command Prompt, which I'm 
looking at right now. Yes, it has cd, and so on. I'm also looking at 
the Python command line window. It allow one to run interactively.


If I write a simple python program with just raw_input, by clicking on 
the file name, I get a window with the the title \Python25\pythonexe 
that shows the prompt. If I deliberately put a syntax error in the 
program, and run it by clicking the file, then A window appears and 
disappears so quickly that I have no idea what it said. How do I keep 
that window up?


Which, if any, of these is the real Python console? What is the window 
called in the example I gave with raw_input?




Run the program from within the MS command line, not by double clicking it.


Or create a .bat file containing the commands to run the Python program,
ending with the command pause, which will wait for you to press a key
when the program has quit.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-20 Thread W. eWatson

W. eWatson wrote:

David Smith wrote:

W. eWatson wrote:

I'm not sure whether I should feel old or write a smart alec comment --
I suppose there are people in the world who don't know what to do 
with a

command prompt

Assuming a Windows system:

2. Type 'cd ' (as in Change Directory) in the command prompt window 
(w/o

the single quote characters)
3. Drag/drop the folder containing your python script to your command
prompt window
4. Hit enter in your command prompt window.
5. Type python my_script_name.py to execute my_script_name.py.

--David

If I enter just cd, then it tells me cd is not defined. If I enter
c:/python25, it tells me I have a syntax error at c in c:. The title of
the black background window I have up with a  prompt shown in it is
Python(command line). Maybe this isn't the real Python console window?

What I want is that if I execute the program by double clicking on its
name to display the console window with the program or syntax errors
shown without it closing in a split second. Putting read_raw in it
doesn't work, since some error prevents it from ever being seen.



What I meant was open open the command prompt, type cd, space, DO NOT
hit enter yet.  Drag the folder with your script into the command prompt
window.  Then go to the command prompt window and hit enter.  This
should compose a command similar to the following:

C:\Documents and Settings\user cd C:\Documents and Settings\user\My
Documents\My Project

C:\Documents and Settings\user\My Documents\My Project _

--David
Ah, I thought I'd be clever and do a copy on the path name in the 
address area at the top of the folder. That doesn't work. I'm quite 
surprised though that one can do the drag as you say. But, hey, it 
works. Thanks. I wonder what else non-DOS things can be done in it?


Well, there is a difficulty with this method. The path is very long, and one 
must change the property width of the window. However, putting the name of a 
long py file further complicates this.


The negative surprise here is that I'm trying to avoid executing the program 
in IDLE, because I'm told elsewhere it produced erroneous error msgs. They 
are exactly the same here. I'll take this up on another thread.




--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Keeping the Console Open with IDLE

2009-02-19 Thread W. eWatson
I'm using IDLE for editing, but execute programs directly. If there are 
execution or compile errors, the console closes before I can see what it 
contains. How do I prevent that?

--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

Web Page: www.speckledwithstars.net/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Keeping the Console Open with IDLE

2009-02-19 Thread Matimus
On Feb 19, 8:06 pm, W. eWatson notval...@sbcglobal.net wrote:
 I'm using IDLE for editing, but execute programs directly. If there are
 execution or compile errors, the console closes before I can see what it
 contains. How do I prevent that?
 --
                                 W. eWatson

               (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
                Obz Site:  39° 15' 7 N, 121° 2' 32 W, 2700 feet

                      Web Page: www.speckledwithstars.net/

Open a console window and type in the name of the script rather than
just double clicking on it. Or, you can terminate your script with a
'raw_input(press enter to quit)'.

Matt
--
http://mail.python.org/mailman/listinfo/python-list