__version__ = "2.2" import os import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from models import Console, GuiQt if __name__ == "__main__": if len(sys.argv) > 1 and "--verstion" in sys.argv[1:]: print __version__ sys.exit(0) if len(sys.argv) == 1: app = QApplication(sys.argv) app.setApplicationName('Pycrypter') window = GuiQt() window.show() sys.exit(app.exec_()) else: console = Console() console.execute(sys.argv)
#! /usr/bin/env python import sys from models import Console, Terminal if __name__ == "__main__": argv = list(sys.argv) del argv[0] if argv: console = Console() console.execute(argv) else: terminal = Terminal() terminal.run()