473,779 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3047
Jonathan Fine <jf***@pytex.or g> 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.or g> 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.__fil e__)
IdleConf.load(i dle_dir)

# new code
import Tkinter
import EditorWindow

root = Tkinter.Tk()

EditorWindow.Ed itorWindow(root =root)
EditorWindow.ma inloop()
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.or g> 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
1783
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 features including tabs for multiple 'files' and searching. It will be a Win32 deployment. My question is can anyone recommend a good Python editor program that I can use as a starting point for customisation? I'd like to base it on Scintilla and...
4
1958
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 done any database work before and am ken to learn - but most of the ones I've seen seem to rely on a database engine buit into a server.. I need a simple stand alone engine. Of course I could just build the functions I need - but that would be a...
81
4749
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, just because retarded backwards compatibility and because the python comunity and developers refuses to consider tools as being almost as important as the language itself. What does c# .net has that python doesnt ? (significant features) --...
30
2915
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 some help to find out how the same thing is done in Python. I am not sure what the standard is. In C++, I open up an editor in one window, a Unix shell in another. I write the code in the editor, then switch to the shell window for compile...
10
110310
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 it also integrates UPX (Ultimate Packer for eXecutables) into the build process, if you have it installed. It also claims functionality on linux, as a bonus (I didn't test this). I highly recommend the UPX options, and will cover how to get it...
4
34898
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 a simple python app into a single .exe file that can be copied and run on any Windows XP machine. It may work on many other Windows platforms, but I haven't tested it. You'll need a working Python installation first, preferably v2.3 or later. ...
8
19511
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 with python and would be grateful for a response. Thanx!
4
1528
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 do in an editor, but want to do it automatically. I have a set of generic rules that my fingers follow to process these files, which all follow a similar template. Question: can I translate these types of rules into programmatical constructs...
2
10894
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 Python after cutting my programming teeth on Matlab, where you get a list of all open file identifiers (that is, those opened from a particular Matlab session) with "fopen('all')" and close them with "fclose('all')". In my 4 years of experience...
0
9471
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10071
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.