ライブラリの依存関係を調べるpipdeptree

blog.amedama.jp

ちなみにpyinstaller は以下。

PyInstaller==3.3.1 - future [required: Any, installed: 0.16.0] - macholib [required: >=1.8, installed: 1.9] - altgraph [required: >=0.15, installed: 0.15] - pefile [required: >=2017.8.1, installed: 2017.11.5] - future [required: Any, installed: 0.16.0] - setuptools [required: Any, installed: 28.8.0]

exeファイル変換

python実行ファイル変換モジュール比較2 - Qiita

N@i.jp

qiita.com

WindowsでPythonにcx_Freezeをインストールする - batch-file - python-3.x | CODE Q&A [日本語]

・pip install だけだと、cxfreeze-quickstartが使えなくて。*.batをつくると、実行できるようになる。 cxfreeze-quickstartはsetup.pyのテンプレを作ってくれる。

・matplotをimportすると、importするだけでtclのライブラリを要求される。

cuiアプリ扱いならexeは問題なく作れた。numpy使っていてもOK

from cx_Freeze import setup, Executable
import numpy as np

# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = ['numpy'], excludes = [])

base = 'Console'

executables = [
    Executable('mat.py', base=base)
]

setup(name='mat',
      version = '1',
      description = '',
      options = dict(build_exe = buildOptions),
      executables = executables)
#import matplotlib.pyplot as plt
import numpy as np

a=np.arange(100)
print(a)
#plt.plot(a)
#plt.show()

ライブラリのリスト

astroid (1.5.3) bleach (2.0.0) colorama (0.3.9) cx-Freeze (5.0.2) cycler (0.10.0) decorator (4.1.2) entrypoints (0.2.3) html5lib (0.999999999) ipykernel (4.6.1) ipython (6.1.0) ipython-genutils (0.2.0) ipywidgets (7.0.0) isort (4.2.15) jedi (0.10.2) Jinja2 (2.9.6) jsonschema (2.6.0) jupyter (1.0.0) jupyter-client (5.1.0) jupyter-console (5.2.0) jupyter-core (4.3.0) lazy-object-proxy (1.3.1) MarkupSafe (1.0) matplotlib (2.0.2) mccabe (0.6.1) mistune (0.7.4) nbconvert (5.3.0) nbformat (4.4.0) notebook (5.0.0) numpy (1.13.1) olefile (0.44) opencv-python (3.3.0.10) pandas (0.20.3) pandocfilters (1.4.2) pickleshare (0.7.4) Pillow (4.2.1) pip (9.0.1) prompt-toolkit (1.0.15) Pygments (2.2.0) pylint (1.7.2) pyparsing (2.2.0) python-dateutil (2.6.1) pytz (2017.2) pyzmq (16.0.2) qtconsole (4.3.1) setuptools (28.8.0) simplegeneric (0.8.1) six (1.10.0) testpath (0.3.1) tornado (4.5.2) traitlets (4.3.2) wcwidth (0.1.7) webencodings (0.5.1) widgetsnbextension (3.0.2) wrapt (1.10.11)

numpyでバイナリ読み込み

from PIL import Image import numpy as np

バイナリファイルから読みこみ

file_name='test_bin.bin' bin_arr = np.fromfile(file_name, dtype='uint8').reshape(4,16)

print(bin_arr.shape) plt.imshow(bin_arr)

image.show(command='display -quiet')

virtualbox ubuntuでパスワードを忘れたときの対応

リカバリーモードでパスワードを変える。

Ubuntu 16.04でパスワードを忘れたときの対応や諸注意的なの - Qiita

リカバリーモードの文字化けを治す。

https://www.hiroom2.com/2016/05/13/ubuntu-16-04%E3%81%AErecovery-mode%E3%81%AE%E6%96%87%E5%AD%97%E5%8C%96%E3%81%91%E3%82%92%E4%BF%AE%E6%AD%A3%E3%81%99%E3%82%8B/

ttlマクロの書き方

役立ちそうなリンク

できる!Tera Termマクロ | プロフェッショナルのためのTera Termマクロ専門情報サイト

マクロ言語 "Tera Term Language (TTL)"

TeraTerm マクロ入門

Tera Termマクロ活用入門(1):各種ログインを自動化する | OSDN Magazine

よく使うコマンド

sendln 一行送信

recvln 一行受信

wait 特定の文字列受信待ち

pause 一定時間停止

include 別のttlファイル読み込み実行

for, next ループ

if, then, elseif, else, endif 条件分岐

filereadln テキストファイル読み込み

fileopen ファイルオープン

src=' #include <stdio.h> ' strtrim src ' ' messagebox src 'result' ; '#include <stdio.h>'

messagebox 'abcde' 'default'

test_str='[COM2] 2018/01/11.04.04 90000000 | 01020005' strsplit test_str '|' 9

tmp_ver=groupmatchstr2

messagebox tmp_ver "tmp_ver1"

strtrim tmp_ver ' ' messagebox tmp_ver "tmp_ver1"