!!!Python {{outline}} ---- ![[Pythonの始め方|PythonIntro]] ![[Pythonのサンプル|PythonSample]] !Tips +パスを通しておく ++Windows の場合は、環境変数「TEMP」の「PATH」に、追加する +改行コードが問題になる場合があるので注意 ++http://python.matrix.jp/tips/compatibility/line_feed/ !Links +[PythonRecipe|http://lightson.dip.jp/zope/ZWiki/PythonRecipe] **処理の基本パターンが一覧になっていて便利 !!実行ファイルにする !pyinstaller https://github.com/pyinstaller/pyinstaller/releases *Python 3.7に対応 コマンドプロンプトで実行 pip install pyinstaller *パイソンのスクリプトを書いておいて、 pyinstaller sample.py --onefile とすると、「dist」というフォルダーができて、その中に、sample.exeファイルができる。 これで実行可能。 !!Windows https://www.python.org/downloads/release/python-373/ Windows x86-64 executable installer !!GUI Tkinter https://wiki.python.org/moin/TkInter http://www.nct9.ne.jp/m_hiroi/light/py3tk01.html !!Anaconda !!jupyter Notebook *Anacondaの中から使えるPython開発環境 *ブラウザーベース(ローカル) !!CGI !文字コードをUTF-8に設定 /etc/httpd/conf/httpd.conf # added below for Python SetEnv PYTHONIOENCODING utf-8 !スクリプトの書き出し {{pre #!/usr/bin/python3 # ヘッダー情報、テキストファイルを指定 print("Content-Type: text/plain; charset=utf-8\n") }}