python exe file is generated and written form

datetime Import 

now datetime.datetime.now = ()

Print ( "current system date is:")
Print (now.strftime ( "% D%% Y-M-% H:% H:% M:% S"))

a = input ( "Please enter your name:")
Print (a)
the iNPUT ()

# 1. the first step in the installation of three modules
# PIP3 install pyqt5
# PIP3 install pywin32
# PIP3 install pyinstaller
# 2. write code .py end
# generate a text renaming a.py
# 3. open cmd execution: pyinstaller -FC: \ Users \ ASUS \ Desktop \ a.py ( file path)
# pyinstaller -FC: \ the Users \ ASUS \ Desktop \ a.py


from openpyxl Import the Workbook 


WB = the Workbook ()   # Mr. into a workbook 
WB1 = wb.create_sheet ( ' Index3 ' , 0)   # Create a form page back via the digital control position 
WB2 = wb.create_sheet ( ' index1, ' ) 
WB1. title = ' Login '   # late title modified form can form page by page name target point 
WB1 [ " A1 " ] = " product " 
WB1 [ " Bl " ] = " price " 
WB1 [ "C1"] = " Details " 
WB1 [ ' A2 ' ] = " Apple " 
WB1 [ ' B2 ' ] = 50 
WB1 [ ' C2 ' ] = " fruit " 
WB1 [ ' A3 ' ] = " orange " 
WB1 [ ' B3 ' ] = 20 is 
WB1 [ ' a C3 ' ] = " fruit " 
# wb1.cell (row =. 6, column =. 3, value = 88888888). 6 rows # 3 insert 888888 
# WB1 [ 'A5 '] =' = sum (A3: A4) '
wb.save('test.xlsx')

 

Guess you like

Origin www.cnblogs.com/wukai66/p/12602022.html