[Development] SmartFiller - Parse a file and fill data into excel files.(tkinter)
===
###### tags: `development`, `python`, `tool`, `tkinter`, `multithreading`, `multiprocess`, `queue`
[ToC]
## SmartFiller.py</br>
### Prerequisite
This is a tool to anaylze and fill data into an execel file according to a log file.
* Input:
1. log.txt
2. path of target excel file (xxx.xlsm)
3. path of additional saving file(skip now)
* Output:
1. the same with path of target excel file (xxx.xlsm)
### ScreenShot

### Source code
{%gist 109502c0e7141a2da7d7685f74b13cf7%}
## SmartFiller.exe
To pack all python module into a exe file by:
```
pip install --upgrade pyinstaller
pyinstaller -F SmartMover.py
```
It is worth to notice that 64-bit exe can only run on 64-bit OS, and the .exe is dependent on the version of python you installed.
### Logs
```bash=
F:\SmartMove>pyinstaller -F .\SmartFill.py
175 INFO: PyInstaller: 3.4
176 INFO: Python: 3.6.7
176 INFO: Platform: Windows-7-6.1.7601-SP1
268 INFO: wrote F:\SmartMove\SmartFill.spec
278 INFO: UPX is not available.
339 INFO: Extending PYTHONPATH with paths
['F:\\SmartMove', 'F:\\SmartMove']
339 INFO: checking Analysis
340 INFO: Building Analysis because Analysis-00.toc is non existent
340 INFO: Initializing module dependency graph...
347 INFO: Initializing module graph hooks...
355 INFO: Analyzing base_library.zip ...
11757 INFO: running Analysis Analysis-00.toc
11832 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of
final executable
required by c:\users\Endorphin\appdata\local\programs\python\python36\python.exe
12952 INFO: Caching module hooks...
12970 INFO: Analyzing F:\SmartMove\SmartFill.py
15747 INFO: Loading module hooks...
15747 INFO: Loading module hook "hook-encodings.py"...
15960 INFO: Loading module hook "hook-openpyxl.py"...
15970 INFO: Loading module hook "hook-PIL.Image.py"...
16167 INFO: Processing pre-find module path hook distutils
16606 INFO: Loading module hook "hook-PIL.py"...
16608 INFO: Excluding import 'PySide'
16610 INFO: Removing import of PySide from module PIL.ImageQt
16612 INFO: Excluding import 'PyQt4'
16615 INFO: Removing import of PyQt4 from module PIL.ImageQt
16617 INFO: Excluding import 'PyQt5'
16619 INFO: Removing import of PyQt5 from module PIL.ImageQt
16620 INFO: Import to be excluded not found: 'FixTk'
16620 INFO: Excluding import 'tkinter'
16623 INFO: Removing import of tkinter from module PIL.ImageTk
16624 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
16626 INFO: Import to be excluded not found: 'FixTk'
16626 INFO: Excluding import 'tkinter'
16627 INFO: Loading module hook "hook-pydoc.py"...
16629 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
16631 INFO: Loading module hook "hook-xml.py"...
16960 INFO: Loading module hook "hook-_tkinter.py"...
17213 INFO: checking Tree
17213 INFO: Building Tree because Tree-00.toc is non existent
17214 INFO: Building Tree Tree-00.toc
17706 INFO: checking Tree
17707 INFO: Building Tree because Tree-01.toc is non existent
17707 INFO: Building Tree Tree-01.toc
17789 INFO: Loading module hook "hook-distutils.py"...
17855 INFO: Looking for ctypes DLLs
17856 INFO: Analyzing run-time hooks ...
17862 INFO: Including run-time hook 'pyi_rth__tkinter.py'
17877 INFO: Looking for dynamic libraries
18294 INFO: Looking for eggs
18294 INFO: Using Python library c:\users\Endorphin\appdata\local\programs\python\py
thon36\python36.dll
18294 INFO: Found binding redirects:
[]
18340 INFO: Warnings written to F:\SmartMove\build\SmartFill\warn-SmartFill.txt
20535 INFO: Graph cross-reference written to F:\SmartMove\build\SmartFill\xref-S
martFill.html
20912 INFO: checking PYZ
20913 INFO: Building PYZ because PYZ-00.toc is non existent
20913 INFO: Building PYZ (ZlibArchive) F:\SmartMove\build\SmartFill\PYZ-00.pyz
24090 INFO: Building PYZ (ZlibArchive) F:\SmartMove\build\SmartFill\PYZ-00.pyz c
ompleted successfully.
24322 INFO: checking PKG
24323 INFO: Building PKG because PKG-00.toc is non existent
24324 INFO: Building PKG (CArchive) PKG-00.pkg
47477 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
47799 INFO: Bootloader c:\users\Endorphin\appdata\local\programs\python\python36\lib
\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
47800 INFO: checking EXE
47801 INFO: Building EXE because EXE-00.toc is non existent
47802 INFO: Building EXE from EXE-00.toc
47826 INFO: Appending archive to EXE F:\SmartMove\dist\SmartFill.exe
56268 INFO: Building EXE from EXE-00.toc completed successfully.
```
## Reference
http://effbot.org/tkinterbook/grid.htm
https://www.python-course.eu/tkinter_buttons.php
http://yhhuang1966.blogspot.com/2016/05/python-gui-tkinter.html
https://matthewventure.blogspot.com/2016/07/notepad-python.html
https://medium.com/pyladies-taiwan/python-%E5%B0%87python%E6%89%93%E5%8C%85%E6%88%90exe%E6%AA%94-32a4bacbe351
https://blog.csdn.net/aic1999/article/details/79825982