全文検索:
- 12 フィアル出力
- 出力 ====== <code> pageSource = driver.page_source fileToWrite = open(str(i) + "page_source.html", "w", encoding='UTF-8') fileToWrite.write(pageSource) fileToWrite.close() </code> f = open('myfile.txt', 'w') f = open('myfile.txt', 'a') f = open('myfile.txt',
- 16 共用サーバで、pythonインストール
- 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(pyenv init -)"' >> ~/.bash_profile echo 'export TMPDIR="$HOME/tmp"' >> ~/.bash_profile </code> ==== ちゃんとインストールされているか確認 ==== <code> $ pyen
- 03 Python で json
- th = 'sample.json' with open(savepath, 'w') as outfile: json.dump(data, outfile) </code> ===== Pythonオブジェクトを文字列に変換 ===== <code> import json jsn = json.d
- 05 上の階層からimport
- tem/main.py Traceback (most recent call last): File "item/main.py", line 1, in <module> from ..co... currnet_dir = os.path.dirname( os.path.abspath(__file__) ) sys.path.append(currnet_dir + '/../') from c