Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77456
| References | (2 earlier) <5404b987$0$30001$c3e8da3$5496439d@news.astraweb.com> <mailman.13694.1409602073.18130.python-list@python.org> <zjfNv.198388$rQ.139558@fx13.am4> <CAPTjJmpPjBmtgC2dvuYmGQNc900rb=XUt5LRGHwS0--G+_xCew@mail.gmail.com> <lu5bvo$q9$1@ger.gmane.org> |
|---|---|
| Date | 2014-09-03 07:36 +1000 |
| Subject | Re: Editing text with an external editor in Python |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13720.1409693783.18130.python-list@python.org> (permalink) |
On Wed, Sep 3, 2014 at 7:14 AM, Terry Reedy <tjreedy@udel.edu> wrote: > import tkinter as tk > root = tk.Tk() > text = tk.Text() > text.pack() > root.mainloop() > > I tested tested the functions and wrote the following. > > This is a test text entry. > Enter and Tab work as expected. > The Arrow (Cursor) keys work as expected. > CntL-Left and Cntl-Right move a word at time. > Home and End move to beginning and end of the line. > Cntl-Home and Cntl-Up move to the beginning of the text. > Cntl-End and Cntl-Donw move to the end of the text. > Shift + cursor movement selects between the begin and end slice positions. > PageUp and PageDown are inoperative. > Delete and Backspace work as expected. > At least on Windows, I can select text and delete, > or cut or copy to Clipboard. > I can also paste from the clipboard. > In otherwords, this is a functional minimal text entry widget. Err, that's not all it takes to run an editor :) File opening and saving would be kinda helpful, for a start... But that's what I meant when I said that a multi-line entry field is an extremely standard widget. (I'm a bit surprised that PgUp/PgDn don't work, but the rest of what you say is perfectly standard.) It's a bit harder to do an editor that doesn't just call on a GUI, and more importantly, "tk.Text().pack()" does not make the world's best editor. But it sure is handy when you want to embed an editor in something else! ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Editing text with an external editor in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-02 02:11 +1000
Re: Editing text with an external editor in Python Chris Angelico <rosuav@gmail.com> - 2014-09-02 02:35 +1000
Re: Editing text with an external editor in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-02 04:23 +1000
Re: Editing text with an external editor in Python Tim Chase <python.list@tim.thechases.com> - 2014-09-01 15:06 -0500
Re: Editing text with an external editor in Python alister <alister.nospam.ware@ntlworld.com> - 2014-09-02 08:35 +0000
Re: Editing text with an external editor in Python Chris Angelico <rosuav@gmail.com> - 2014-09-02 18:45 +1000
Re: Editing text with an external editor in Python alister <alister.nospam.ware@ntlworld.com> - 2014-09-03 08:06 +0000
Re: Editing text with an external editor in Python Terry Reedy <tjreedy@udel.edu> - 2014-09-02 17:14 -0400
Re: Editing text with an external editor in Python Chris Angelico <rosuav@gmail.com> - 2014-09-03 07:36 +1000
Re: Editing text with an external editor in Python Terry Reedy <tjreedy@udel.edu> - 2014-09-02 21:49 -0400
Re: Editing text with an external editor in Python Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-09-02 22:03 -0500
Re: Editing text with an external editor in Python Chris Angelico <rosuav@gmail.com> - 2014-09-02 08:30 +1000
Re: Editing text with an external editor in Python Roy Smith <roy@panix.com> - 2014-09-01 13:06 -0400
Re: Editing text with an external editor in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-02 04:02 +1000
Re: Editing text with an external editor in Python Cameron Simpson <cs@zip.com.au> - 2014-09-02 08:14 +1000
Re: Editing text with an external editor in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-02 13:18 +1000
Re: Editing text with an external editor in Python Chris Angelico <rosuav@gmail.com> - 2014-09-02 08:25 +1000
Re: Editing text with an external editor in Python gschemenauer3@gmail.com - 2014-09-01 19:24 -0700
csiph-web