requests.post("http://localhost:8080/find", data=payload)
web.Application(client_max_size=1024**8)
'''
A preparation for creating exe files from scripts. You can use it as a standalone tool or wrap it in a function for mass conversion.
'''
import os
import shutil
import PyInstaller.__main__
exe_file_dir = r'C:\only_exe'
script_address = 'C:\\cri\\python\\test1.py'
PyInstaller.__main__.run([
'--onefile',
# '--noconsole',
'--specpath', exe_file_dir,
'--workpath', exe_file_dir,
'--distpath', exe_file_dir,
script_address
])
all_file_dir = os.listdir(exe_file_dir)
for file in all_file_dir:
file_name, file_extension = os.path.splitext(file)
if file_extension[1:].lower() != 'exe':
path = exe_file_dir + '\\' + file
if os.path.isfile(path):
os.remove(path) # remove the file
elif os.path.isdir(path):
shutil.rmtree(path) # remove dir and all contains
There is also the Worksheet.cell() method.
This provides access to cells using row and column notation:
> > > > > > > > > d = ws.cell(row= 4, column= 2, value= 10)
value = col # col - то значение которое вы хотите поместить в ячейку
cell = sheet.cell(row=row_index, column=col_index) #row_index и col_index соответственно номер строки и номер колонки(координаты нахождения ячейки)
cell.value = value
import os
import shutil
import PyInstaller.__main__
exe_file_dir = r'A:\only_exe' # куда сохранить экзешник
script_address = r'A:\Python\self\script.py' # путь до скрипта твоего и имя скрипта
PyInstaller.__main__.run([
'--onefile',
'--noconsole',
'--specpath', exe_file_dir,
'--workpath', exe_file_dir,
'--distpath', exe_file_dir,
script_address
])
all_file_dir = os.listdir(exe_file_dir)
for file in all_file_dir:
file_name, file_extension = os.path.splitext(file)
if file_extension[1:].lower() != 'exe':
path = exe_file_dir + '\\' + file
if os.path.isfile(path):
os.remove(path) # remove the file
elif os.path.isdir(path):
shutil.rmtree(path) # remove dir and all contains