Keeping the Console Open with IDLE

W. eWatson notvalid2 at sbcglobal.net
Fri Feb 20 12:26:37 EST 2009


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/>




More information about the Python-list mailing list