Older blog entries for tinixtech (starting at number 0)

Silly Idea to make bad Python Editor

2007-10-26 17:22:20




The idea was to make a simple text editor in wxpython with some normal functions.but a window resize

Something code


#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-

import wx

class MainWindow(wx.Frame):

def __init__(self, parent = None, id = -1, title = "Editor Python"):
wx.Frame.__init__(self, parent, id, title, size = (400,200),
style = wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)

self.control = wx.TextCtrl(self, -1, style = wx.TE_MULTILINE)

self.CreateStatusBar()

filemenu = wx.Menu()

menuitem = filemenu.Append(-1, "&About", "About Bad Python Editor")
self.Bind(wx.EVT_MENU, self.OnAbout, menuitem)
filemenu.AppendSeparator()

menuitem = filemenu.Append(-1, "E&xit", "Terminate the program")
self.Bind(wx.EVT_MENU, self.OnExit, menuitem)

menubar = wx.MenuBar()
menubar.Append(filemenu,"&File")
self.SetMenuBar(menubar)

self.Show(True)

A part more to complete. I want to do some more functions.
See you the next post./

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!