| 1 |
#!/usr/bin/env python3 |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
# apt-offline |
| 4 |
# |
| 5 |
############################################################################ |
| 6 |
# Copyright (C) 2010 Manish Sinha # |
| 7 |
# [email protected] # |
| 8 |
# # |
| 9 |
# This program is free software; you can redistribute it and/or modify # |
| 10 |
# it under the terms of the GNU General Public License as published by # |
| 11 |
# the Free Software Foundation; either version 3 of the License, or # |
| 12 |
# (at your option) any later version. # |
| 13 |
# # |
| 14 |
# This program is distributed in the hope that it will be useful, # |
| 15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 17 |
# GNU General Public License for more details. # |
| 18 |
# # |
| 19 |
# You should have received a copy of the GNU General Public License # |
| 20 |
# along with this program; if not, write to the # |
| 21 |
# Free Software Foundation, Inc., # |
| 22 |
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # |
| 23 |
############################################################################ |
| 24 |
|
| 25 |
import sys |
| 26 |
import os |
| 27 |
from PyQt5 import QtCore, QtGui, QtWidgets |
| 28 |
from apt_offline_gui.AptOfflineQtMain import AptOfflineQtMain |
| 29 |
|
| 30 |
try: |
| 31 |
# This seems to be needed, at least of Debian |
| 32 |
os.putenv('QT_X11_NO_MITSHM', "1") |
| 33 |
except: |
| 34 |
sys.stderr.write("Couldn't set environment variable\n") |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
if __name__ == "__main__": |
| 39 |
app = QtWidgets.QApplication(sys.argv) |
| 40 |
myapp = AptOfflineQtMain() |
| 41 |
myapp.show() |
| 42 |
sys.exit(app.exec_()) |
| 43 |
|