Paul Rubin wrote:
Jonathan Fine <[EMAIL PROTECTED]> writes:

I'm looking for a simple Python + Tk text editor.

I want it as a building block/starting point.


Something wrong with IDLE?


Thanks for this suggestion.

For some reason, I did not think of IDLE as an editor.
Must have been a blind spot.

Though not simple, IDLE is a good starting point for me.

And for my project (integration of Python and TeX) there
is most unlikely to be a better one.

However, learning IDLE details might be quite a detour
from my immediate goals.


Some code follows, in case anyone else is interested.


IDLE is not yet a package, it seems. But the idea is there. === [EMAIL PROTECTED]:/usr/lib/idle-python2.1$ cat __init__.py # Dummy file to make this a potential package. ===

/usr/bin/idle hacked to produce an EditorWindow.
===
#! /usr/bin/python

import os
import sys
sys.path[:0] = ['/usr/lib/idle-python2.1']
import IdleConf

idle_dir = os.path.dirname(IdleConf.__file__)
IdleConf.load(idle_dir)

# new code
import Tkinter
import EditorWindow

root = Tkinter.Tk()

EditorWindow.EditorWindow(root=root)
EditorWindow.mainloop()
sys.exit()
# end of new code

# defer importing Pyshell until IdleConf is loaded
import PyShell
PyShell.main()
===

--
Jonathan
http://qatex.souceforge.org

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

Reply via email to