The gist is:
- install the normal python from python.org
- install everything into a venv
- copy the venv into python embed.
unzip python-3.8.0-embed-amd64.zip| #!/usr/bin/env python | |
| ################################################################################ | |
| import sys | |
| from time import sleep | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| from selenium.common.exceptions import NoSuchElementException |
| #coding:utf-8 | |
| # from: http://z4none.me/2014/07/09/Python-%E4%B8%AD%E4%BD%BF%E7%94%A8-libmp3lame-%E8%BF%9B%E8%A1%8C-mp3-%E7%BC%96%E8%A7%A3%E7%A0%81/ | |
| import time | |
| import ctypes | |
| class LameEncoder(): | |
| def __init__(self, sample_rate, channel_count, bit_rate): | |
| self.dll = ctypes.CDLL("libmp3lame.dll") |
| __author__ = 'artemr' | |
| ''' | |
| 왜 파이썬 데코레이터를 만들때, @wraps어노테이션을 쓰는 것을 권장하는 걸까? | |
| 이유인 즉슨, 데코레이터 내부에서 인자로 전달받은 함수가 익명함수 처럼 취급되어 버리므로 디버깅이 난해해지는 단점이 있었기 때문이다. | |
| 자세한 설명은 아래의 링크에 첨부되어 있다. | |
| 원본: http://artemrudenko.wordpress.com/2013/04/15/python-why-you-need-to-use-wraps-with-decorators/ | |
| 사본: https://www.evernote.com/shard/s174/sh/78eaad5f-a8f2-4496-b984-e3385fb963c0/922d9ab4b5cd23ac7b85aab42536aa4f | |
| ''' | |
| from flask import Flask | |
| app = Flask(__name__) | |
| from flaskext.celery import Celery | |
| celery = Celery(app) | |
| def process_global(glob_obj): | |
| g.db = app.config['MONGO_DATABASE'] # get the unpickle-izable database | |
| for k,v in glob_obj.iteritems(): |
| #!/usr/bin/python | |
| """Yet another curses-based directory tree browser, in Python. | |
| I thought I could use something like this for filename entry, kind of | |
| like the old 4DOS 'select' command --- cd $(cursoutline.py). So you | |
| navigate and hit Enter, and it exits and spits out the file you're on. | |
| Originally from: http://lists.canonical.org/pipermail/kragen-hacks/2005-December/000424.html | |
| Originally by: Kragen Sitaker |