This wiki is in the process of being archived due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies. Edits are discouraged.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

"Simple" Stage 3

Here is listing of the next stage, namely Stage 3:

   1 #!/usr/bin/env python
   2 # .../simple_1/simple.py
   3 '''A really simple editor program in PyQt4 - simple.py'''
   4 
   5 import sys
   6 
   7 from PyQt4.QtGui import (QMainWindow, QApplication, QFileDialog)
   8 from PyQt4.QtCore import SIGNAL
   9 
  10 from ui_simple import Ui_MainWindow
  11 __version__ = "0.0.04"
  12 class MainWindow(QMainWindow, Ui_MainWindow):
  13     def __init__(self, parent=None):
  14         super(MainWindow, self).__init__(parent)                                         
  15         self.setupUi(self)
  16         self.action_New.triggered.connect(self.fileNew)
  17         self.action_Open.triggered.connect(self.fileOpen)
  18         self.action_Save.triggered.connect(self.fileSave)
  19         self.actionSave_As.triggered.connect(self.fileSaveAs)
  20         self.fileName = None
  21         
  22     def fileNew(self):
  23         '''Clear the editor window for a new file with name
  24         specified in fileSaveAs method.'''
  25         self.