Tal Einat wrote:
Mark Fenton wrote:
Does anyone know how to do the following:
...
Save the above as HiLo.py in site packages then put a shortcut onto desktop
and when it's double - clicked it comes up NOT in a black dos window but as
it would if one were to run it from the IDLE i.e., white background with
blue characters.
This works for me, after having saved the code as C:\hilo.py :
I create a shortcut to hilo.py on the desktop, then enter the
shortcut's properties and enter this in the 'target' field:
C:\Python25\python.exe C:\Python25\Lib\idlelib\idle.py -r C:\hilo.py
(copy/paste and run this in the command line first to make sure that
it works right)
You could alternatively change the 'start in' field to
"C:\Python25\Lib\idlelib" (without the quotes), and the just have
"idle.bat -r C:\hilo.py" in the 'target' field.
The missing part of the trick to eliminate the dread "DOS Box" is
to use "pythonw" rather than python.
If you really are using python 2.5(.*) or later, you can simplify
the command a bit:
C:\Python25\pythonw.exe -m idlelib.idle -r C:\hilo.py
When using this, the "start in" field is irrelevant.
As to the colored text:
print "foo"
print >>sys.stderr, "mumble"
will print in a pair of colors in Idle (I don't think you get
general control over the colors.).
--Scott David Daniels
[EMAIL PROTECTED]
_______________________________________________
IDLE-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/idle-dev