RE: [Pythoncard-users] codeEditor sample
by Kevin Altis other posts by this author
May 9 2002 4:13PM messages near this date
RE: [Pythoncard-users] codeEditor sample
|
[Pythoncard-users] added rpn calculator sample
> From: David Primmer
>
> I'm not getting a std out window when I run with interpreter. And, if I
> put something in openbackground and run with interpreter, my app never
> fully loads. And, I'm not getting the usual debug menu.
> Also, it would be nice to auto-save when you run the script.
There is no Debug menu by default with codeEditor, you have to start it with
one of the standard command-line options (-m, -n, -p, -s) just like any
other sample.
As far as stdout, I'm not exactly sure what you mean. Since os.spawnv is now
being used for launching, the interpreter and prompt will appear in the
console associated with codeEditor. If you start codeEditor with pythonw.exe
then there won't be a console and so you won't see anything. All you might
see is a
> >>
so it can be pretty subtle. This seems to differ a bit between platforms
which is part of the reason this problem still plagues us. There doesn't
seem to be a single standard way of launching scripts in the standard
libraries. There probably should be, so anyone that wants to is welcome to
bring this up on the comp.lang.python newsgroup.
If you want, you can also try using os.system. The resourceEditor still has
the os.system call commented out where I switched to os.spawnv. You'll have
to tweak the argument list to os.system a bit, but you can see if that works
better for you.
I also don't why something in openBackground would be a particular problem
if a script normally runs with the -i interpreter option. I can edit
codeEditor.py with codeEditor and launch with interpreter just fine and it
is a huge openBackground handler.
I'm going to have to spend time exploring alternatives for running scripts
in a separate process when I get back. We'll have to do this to support
debugging. One of the prime candidates is a variation on the RunScript
function in the scriptutils.py module that is part of Mark Hammond's
Pythonwin (part of win32all)
http://starship.python.net/crew/mhammond/
The file is located at:
Pythonwin\pywin\framework\scriptutils.py
I modified part of this for codeEditor. Neil Hodgson has modification that
if I remember correctly is win32 specific, but allows processes to run in a
separate process.
Patrick might actually want a separate process script launch that he can
then capture results from for PyCrust, but he isn't letting me throw any
more "to do" items over the fence into his yard ;-), so unless Neil or
Patrick or someone else that wants to take this project on, you'll have to
wait.
Auto-save for Check Syntax and Run Script checked in. Auto-save will be
optional later.
ka
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@[...].net
_______________________________________________
Pythoncard-users mailing list
Pythoncard-users@[...].net
https://lists.sourceforge.net/lists/listinfo/pythoncard-users
Thread:
Kevin Altis
David Primmer
Kevin Altis
|