Connecting Tech Pros Worldwide Forums | Help | Site Map

To construct a text editor by Python

Newbie
 
Join Date: Oct 2008
Location: Sweden-Gothenburg
Posts: 1
#1: Oct 31 '08
Hi All,
First I need to construct a text editor by python programming and add this code to a biger code that has been written before, and i would like that by my code for this editor have a capability to save it into special file name and format, for instance if i want to save it to a file with XML extention format like A.xml, wondering if anybody kknows how to do that, if you have any idea please guide me through how to reach to these.
Thanks

Newbie
 
Join Date: Oct 2008
Location: Earth
Posts: 29
#2: Nov 1 '08

re: To construct a text editor by Python


Do you want your text editor to use a GUI or be console based ? If you want to make your own file format, then you will need to make a specification for extension. If you want I will help you code your text editor.
Newbie
 
Join Date: Jan 2009
Location: Minneapolis, MN
Posts: 1
#3: Jan 7 '09

re: To construct a text editor by Python


It sounds like I want to do something similar to danesh1354. I want to create a lightweight text editor written in Python that uses a custom file format. Fabez, would you mind pointing me in the right direction too?

First does it make sense to customize or learn from any of these text editors:

PyQT4 Text Editor (a tutorial in three parts)
Simple text editor in PyQT4
Extending PyQT4 text editor
PyQT4 Text editor - final changes

PyWord
PyWord/pyprime Homepage - PyWord and pyprime

Edge (a joking and/or simple version of PyWord)
edge source code - PyWord and pyprime

Txtinator
Txtinator - a text editor written in Python - Blender Artists Forums

Code for a text editor posted to ubuntuforums
Python Text Editor help - Page 2 - Ubuntu Forums

There are a few different GUI toolkits represented (QT4, Tkinter, wxPython). Does anyone have any recommendations? Are some better for certain purposes?

Finally, does anyone have any tips on getting a text editor to read from and write to a custom file format, probably XML-based.

Thanks.
Smygis's Avatar
Member
 
Join Date: Jun 2007
Posts: 100
#4: Jan 7 '09

re: To construct a text editor by Python


I prefer wx. But there is really no big difference between GTK+, Qt and wx. Feature and maturity wise. Tk however is slightly different. And personally i dont like it.

But what you should use is really up to you. Take a quick check on there documentation and some sample code and go with the one that suits you the best.
Reply