Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 12:57 AM
Jonathan Fine
Guest
 
Posts: n/a
Default Simple Python + Tk text editor

Hi

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

I want it as a building block/starting point.

I need basic functions only:
open a file, save a file, new file etc.

It has to be open source.

Anyone know of a candidate?

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

  #2  
Old July 19th, 2005, 12:57 AM
Paul Rubin
Guest
 
Posts: n/a
Default Re: Simple Python + Tk text editor

Jonathan Fine <jfine@pytex.org> writes:[color=blue]
> I'm looking for a simple Python + Tk text editor.
>
> I want it as a building block/starting point.[/color]

Something wrong with IDLE?
  #3  
Old July 19th, 2005, 12:59 AM
Jonathan Fine
Guest
 
Posts: n/a
Default Re: Simple Python + Tk text editor

Paul Rubin wrote:[color=blue]
> Jonathan Fine <jfine@pytex.org> writes:
>[color=green]
>>I'm looking for a simple Python + Tk text editor.
>>
>>I want it as a building block/starting point.[/color]
>
>
> Something wrong with IDLE?[/color]


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.
===
jfine@apricot:/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

  #4  
Old July 19th, 2005, 12:59 AM
Eric Brunel
Guest
 
Posts: n/a
Default Re: Simple Python + Tk text editor

On Thu, 14 Apr 2005 06:41:26 +0100, Jonathan Fine <jfine@pytex.org> wrote:
[snip][color=blue]
> And for my project (integration of Python and TeX) there
> is most unlikely to be a better one.[/color]

Do you know the (apparently dead) project named e:doc? You can find it here:
http://members.nextra.at/hfbuch/edoc/
It's a kind of word processor that can produce final documents to various formats using backends, and one of the backends is for LaTeX.

It's written in Perl, but with Perl::Tk as a tool-kit, so it is quite close to Tkinter. There may be some ideas to steal from it.

HTH
--
python -c 'print "".join([chr(154 - ord(c)) for c in "U(17zX(%,5.z^5(17l8(%,5.Z*(93-965$l7+-"])'
  #5  
Old July 19th, 2005, 01:00 AM
Jonathan Fine
Guest
 
Posts: n/a
Default Re: Simple Python + Tk text editor

Eric Brunel wrote:
<snip>
[color=blue]
> Do you know the (apparently dead) project named e:doc? You can find it
> here:
> http://members.nextra.at/hfbuch/edoc/
> It's a kind of word processor that can produce final documents to
> various formats using backends, and one of the backends is for LaTeX.
>
> It's written in Perl, but with Perl::Tk as a tool-kit, so it is quite
> close to Tkinter. There may be some ideas to steal from it.[/color]


Thanks for this. I've not seen it before

There are quite a few GUI semi-wysiwyg front ends to (La)TeX.

Interesting that there are so many, and that besides LyX few
seem to have succeeded. Guess it's an important problem that
is also difficult.

My approach is a rather different - it is to exploit running
TeX as a daemon
http://www.pytex.org/texd

This allows for Instant Preview. My application is simply
a means of show-casing this capability. And making it
useful in simple contexts.

So what I'm really wanting to do is provide a component for
projects such as e:doc.

Any, this might be a bit off-topic.

And thanks again for the link.

--
Jonathan
http://qatex.sourceforge.net



 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles