473,769 Members | 2,244 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To construct a text editor by Python

1 New Member
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
Oct 31 '08 #1
3 14573
Fabez
29 New Member
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.
Nov 1 '08 #2
mcarlson
1 New Member
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.
Jan 7 '09 #3
Smygis
126 New Member
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.
Jan 7 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3746
by: Srinath Avadhanula | last post by:
Hello, Sorry to be bringing up what seems to be a somewhat beaten up topic... This is what I wanted to do: Create a _simple_ text editor widget which supports VI(M) style keybindings but works with arbitrary fonts/unicode characters. Vi(m) unfortunately, does not support Devanagari (or proportional fonts) and it looks like it will take quite some time for these things to work. As
11
3552
by: Ed Suominen | last post by:
I'm thinking of implementing a real-time collaborative text editor in Python using Twisted. An initial plan is to use a Twisted PB server daemon that accepts user:password:file connections from text editor clients to make changes to a specified file on the server, and have the text editor clients update their local copies of the file based on local user input or input entered from other users, relayed via the server. Jabber compatibility...
4
3047
by: Jonathan Fine | last post by:
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.
24
2597
by: John Salerno | last post by:
This is a real small point, but I'd like to hear what others do in this case. It's more an 'administrative' type question than Python code question, but it still involves a bit of syntax. One thing I like to do is use tabs for my indentation, because this makes it easy to outdent when I need to start a new line in column 1. I can press backspace once and move 4 spaces to the left. But I read in the PEP that spaces are recommended over...
63
3972
by: John Salerno | last post by:
I know there's a request for a good IDE at least once a week on the ng, but hopefully this question is a little different. I'm looking for suggestions for a good cross-platform text editor (which the features for coding, such as syntax highlighting, etc.) but not a full IDE with all the fancy jazz (GUI developer, UML diagrams, etc.). Ideally, it would be something I could even put on a flash drive and move from computer to computer, but...
4
3124
by: pbreah | last post by:
I'm doing a Rich Text Editor (WYSIWYG) in javascript for a game for kids. I'm doing a special case in with every keystroke from A-Z creates a background and foreground color for that letter, witch is the same. The problem is editing doesn't work that well. For example when I type: ABCDFG , I get this code generated and displayed by the Rich Text Editor: <P><FONT style="BACKGROUND-COLOR: #ffff00" color=#ffff00>a<FONT...
31
2067
by: John Salerno | last post by:
Ok, I know it's been asked a million times, but I have a more specific question so hopefully this won't be just the same old post. I've tried a few different editors, and I really like UltraEdit, but it's Windows-only and I'm working more on Linux nowadays. Here are my criteria: 1. syntax highlighting (highly customizable) 2. auto/smart indenting 3. ability to run script
23
3606
by: T. Crane | last post by:
Right now I'm using Notepad++. What are other people using? trevis
0
1167
by: MeTheGameMakingGuy | last post by:
I'm writing a little 'command line simulator' in Python. It runs completely within regular command lines, using simple prints and raw_inputs. I need to code a text editor for editing the virtual files in the simulation. It needs to function somewhat like pywarrior (ubuntuforums.org/showthread.php?t=866035), although simplified, of course. However, I'd like it to run on as many platforms as possible. pywarrior only runs on Linux/Mac OS,...
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
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
10206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10035
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...
0
9851
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7403
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
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2811
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.