Commits

Anonymous committed d7ea184

can embed emacs in an x window

  • Participants

Comments (0)

Files changed (1)

File qxembed-emacs.py

+#!/usr/bin/env python
+# encoding: utf-8
+
+"""A test-program for embedding emacs in KDE."""
+
+from PyQt4.QtGui import QX11EmbedContainer
+from PyQt4.QtGui import QApplication
+from PyQt4.QtCore import QProcess, SIGNAL, SLOT
+
+from sys import argv
+
+app = QApplication(argv)
+
+container = QX11EmbedContainer()
+container.show()
+process = QProcess(container)
+args = ["--parent-id", str(container.winId())]
+process.start("emacs", args)
+container.connect(container, SIGNAL("clientClosed()"), app.quit)
+status = app.exec_()
+process.close()
+
+
+### Self Test == Run the Program ###
+
+if __name__ == "__main__":
+    pass