全文検索:
- 07 Python Selenium
- tc/yum.repos.d/google.chrome.repo [google-chrome] name=google-chrome baseurl=http://dl.google.com/linux/... de> # ID/PASSを入力して、ボタンクリック driver.find_element_by_name("USERID").clear() driver.find_element_by_name("USERID").send_keys("hoge") driver.find_element_by_name("PASSWORD").clear() driver.find_element_by_name("
- 08 Python 文字列リテラル(fr)
- 、 .format() を使うことなく 文字列の中に変数を埋め込むことが出来ます。 <code> name = 'King Kai' like = 'driving' print(f"My name is {name}. I like {like}.") # My name is King Kai. I like driving. </code> ===== r… raw string ===== 通常はバックスラッ
- 16 共用サーバで、pythonインストール
- : utf-8 -*- from flask import Flask app = Flask(__name__) @app.route('/') def index(): return "Hello World!\n" if __name__ == '__main__': app.run() </code> <code|in... t_response): # ※要書き換え environ['SERVER_NAME'] = "hogehoge.sakura.ne.jp" environ['SERVER... n['REQUEST_METHOD'] = "GET" environ['SCRIPT_NAME'] = "" environ['PATH_INFO'] = "/" env
- 04 Python 並列処理
- with ThreadPoolExecutor(max_workers=2, thread_name_prefix="thread") as executor: for i in ra... mit end") getLogger().info("main end") if __name__ == "__main__": main() </code> ===== 実行結果 =
- 05 上の階層からimport
- ==== <code|main.py> from ..conf import mod1 if __name__ == '__main__': print(mod1.MOD) </code> エラー... (currnet_dir + '/../') from conf import mod1 if __name__ == '__main__': print(mod1.MOD) </code> {{
- 09 Flask
- urllib.request import urllib.parse app = Flask(__name__) @app.route('/') def hello(): return "Hell... ood') def good(): return "Good" # start if __name__ == "__main__": app.run(host='0.0.0.0') </code>
- 01 PrettyTable
- ({"1","2","3"}) print(x.get_string()) if __name__ == '__main__': outputTable() </code> ====
- 10 Python retry処理
- + str(MAX_RETRY) ) return 2 # start if __name__ == "__main__": flg = retry() print('re
- 13 Python 非同期処理 asyncio
- _until_complete(gather) print(results) if __name__ == '__main__': main() </code> ===== 実行結果 =