diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6cd11ba --- /dev/null +++ b/.gitignore @@ -0,0 +1,104 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +.static_storage/ +.media/ +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ \ No newline at end of file diff --git a/__pycache__/netassistant.cpython-36.pyc b/__pycache__/netassistant.cpython-36.pyc deleted file mode 100644 index 9cd9abd..0000000 Binary files a/__pycache__/netassistant.cpython-36.pyc and /dev/null differ diff --git a/gen_exe.bat b/gen_exe.bat new file mode 100644 index 0000000..fc8bd21 --- /dev/null +++ b/gen_exe.bat @@ -0,0 +1 @@ +pyinstaller -F --noconsole --add-data netassistant.ui;. main.py diff --git a/gen_exe.sh b/gen_exe.sh new file mode 100755 index 0000000..00a0c1e --- /dev/null +++ b/gen_exe.sh @@ -0,0 +1 @@ +pyinstaller -F --add-data netassistant.ui:. main.py diff --git a/netassistant.py b/netassistant.py index aa96104..ccc29f7 100644 --- a/netassistant.py +++ b/netassistant.py @@ -9,7 +9,7 @@ from PyQt5.QtNetwork import QTcpSocket, QTcpServer, QUdpSocket, QHostAddress uipath, uiname = os.path.split(os.path.realpath(__file__)) -uiname = uiname.replace('.py', '.ui') +uiname = uiname.split('.')[0] + '.ui' uifile = os.path.join(uipath, uiname) ui_mainwindow, qtbaseclass = uic.loadUiType(uifile)