473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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

Jul 18 '05 #1
4 3013
Jonathan Fine <jf***@pytex.org> writes:
I'm looking for a simple Python + Tk text editor.

I want it as a building block/starting point.


Something wrong with IDLE?
Jul 18 '05 #2
Paul Rubin wrote:
Jonathan Fine <jf***@pytex.org> 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.
===
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

Jul 18 '05 #3
On Thu, 14 Apr 2005 06:41:26 +0100, Jonathan Fine <jf***@pytex.org> wrote:
[snip]
And for my project (integration of Python and TeX) there
is most unlikely to be a better one.


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+-"])'
Jul 18 '05 #4
Eric Brunel wrote:
<snip>
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.

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

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: stephenlee | last post by:
I want to develop a simple Python program to edit source code that is persisted in a database (memo fields). The code to be edited is iHTML and SQL and I want syntax colouring and good basic...
4
by: Fuzzyman | last post by:
I'm looking to build a simple database application for use on the desktop (customer contact and feedback database). Anyone able to reccomend a simple module / package I can use... ? I've never...
81
by: julio | last post by:
Sorry but there is no another way, c# .net and mono are going to rip python, not because python is a bad lenguage, but because is to darn old and it refuses to innovate things, to fix wrong things,...
30
by: bblais | last post by:
Hello, Let me start by saying that I am coming from a background using Matlab (or Octave), and C++. I am going to outline the basic nuts-and-bolts of how I work in these languages, and ask for...
10
true911m
by: true911m | last post by:
This is a simple walkthrough to get PyInstaller up and running. I decided to give PI a try, because it claims to be more selective about what it bundles into its executable files by default, and...
4
true911m
by: true911m | last post by:
Here's a little walkthrough to get py2exe up and running. I'm not an expert, so I can't help much with any problems you might have. This is what worked for me. The result here will be to convert...
8
by: why? | last post by:
Im working with Python 2.2 on my red hat linux system. Is there any way to write python codes in separate files and save them so that i can view/edit them in the future? Actually I've just started...
4
by: ferrad | last post by:
I have not used Python before, but believe it may be what I need. I have large text files containing text, numbers, and junk. I want to delete large chunks process other bits, etc, much like I'd...
2
by: BAnderton | last post by:
Greetings from beautiful Tucson, Arizona. Question: Is there a way in Python to determine what all file identifiers have been opened by Python, and to close them all? Why I ask: I learned...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.