John Salerno wrote:[color=blue]
> Kent Johnson wrote:
>[color=green]
>>John Salerno wrote:
>>[color=darkred]
>>>Kent Johnson wrote:
>>>
>>>>You probably don't need to do that. Just run the file in python
>>>>directly. I don't know UE, but when you configure an external tool, tell
>>>>it to run python.exe and pass the current file as a command line parameter.
>>>>
>>>
>>>I've tried a lot of combinations for the command line to execute, but
>>>nothing is working. What format should it be in? Should it look like this:
>>>
>>>C:\Python24\python.exe module ?[/color]
>>
>>C:\Python24\python.exe D:\full\path\to\myprogram.py
>>
>>There is a post on the UltraEdit forum from JohnJSal, is that not you?
>>Whoever it is got this working...
>>
http://www.ultraedit.com/index.php?n...ghlight=python
>>
>>Kent[/color]
>
>
> Yes, that's me. :) But all that that post accomplished was getting me to
> run the file itself, as if I had double-clicked on it. This isn't what I
> want. I want it to run in a 'debug' type of environment like IDLE so I
> can see any error messages.[/color]
I'm not sure what you mean by a 'debug' type environment. If you mean,
you want to run the program in a debugger and step through it, then this
approach won't work. If you just mean that you want to see the output of
the program, it will work.[color=blue]
>
> I tried your suggestion and seems to half-way work. But it doesn't open
> the program in a different environment (such as IDLE), it just opens the
> output in a new text window in UE. Here's the output:
>
> ['qIQNlQSLi', 'eOEKiVEYj', 'aZADnMCZq', 'bZUTkLYNg', 'uCNDeHSBj',
> 'kOIXdKBFh', 'dXJVlGZVm', 'gZAGiLQZx', 'vCJAsACFl', 'qKWGtIDCj']
> Traceback (most recent call last):
> File "C:\Python24\myscripts\challenge\small_letter. py", line 15, in ?
> raw_input()
> EOFError: EOF when reading a line[/color]
OK, your program is reading from standard input and the environment set
up by UltraEdit doesn't support this. If you are trying to run
interactive programs this approach won't work.[color=blue]
>
>
> The list is the output from the script. I don't know why the end of file
> error is raised though, because it wouldn't have been raised if I ran
> the file in IDLE. So something still isn't quite right.[/color]
Because IDLE does support input.
I may have put too much interpretation on your original question because
I have my editor (TextPad) configured to run the front window in Python
and I find it a very productive way to work. But it's not IDLE and it
doesn't allow interactive input. I rarely write a program that requires
keyboard input so that's not a problem for me.
One thing that is really useful about running in an editor window is
that (in TextPad, anyway) I can double-click on an error message and go
directly to the line with the error.
Anyway, it turns out IDLE has a command-line switch that lets you pass a
file to run. Try
C:\Python24\Lib\idlelib\idle -r C:\path\to\myprog.py
Kent