From 3c6168a320cdc480bfd58eb896fc685526857d6c Mon Sep 17 00:00:00 2001 From: shengxiang Date: Sun, 6 Mar 2016 22:41:15 +0800 Subject: [PATCH] ide ^_^ --- CHANGELOG | 17 +++++++++++++++++ README.md | 2 +- airtest/__main__.py | 12 +++++++++--- requirements.txt | 4 ++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d98a7ea..696d218 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,23 @@ CHANGES ======= +* add a very simple ide +* remove useless code +* add simple ide +* add version +* auto convert md to rst +* support multi publish +* fix travis add distributions +* fix travis again +* remove aircv for now +* update test requirements +* fix again +* fix travis yml +* add travis +* update travis +* add pbr requirements +* update dep again + 1.0.0 ----- diff --git a/README.md b/README.md index caa9721..24780ab 100755 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ 2. 安装airtest ``` - pip install -U https://github.com/codeskyblue/airtest/archive/master.zip + pip install -i https://testpypi.python.org/pypi -U --pre airtest ``` 3. 安装android依赖 diff --git a/airtest/__main__.py b/airtest/__main__.py index 29136ac..93f41b5 100644 --- a/airtest/__main__.py +++ b/airtest/__main__.py @@ -17,6 +17,11 @@ import airtest +def cv2_to_pil(image): + img_str = cv2.imencode('.png', image)[1].tostring() + return Image.open(StringIO(img_str)) + + def make_mouse_callback(imgs, ref_pt): # initialize the list of reference points and boolean indicating # whether cropping is being performed or not @@ -53,8 +58,9 @@ def _click_and_crop(event, x, y, flags, param): return _click_and_crop def interactive_save(image, save_to=None): - img_str = cv2.imencode('.png', image)[1].tostring() - imgpil = Image.open(StringIO(img_str)) + imgpil = cv2_to_pil(image) + #img_str = cv2.imencode('.png', image)[1].tostring() + #imgpil = Image.open(StringIO(img_str)) root = Tkinter.Tk() root.geometry('{}x{}'.format(400, 400)) @@ -118,4 +124,4 @@ def main(): cv2.destroyAllWindows() if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/requirements.txt b/requirements.txt index 61a8e8c..1e98ba7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -aircv==1.4.0 +aircv>=1.4.1 uiautomator==0.2.6 -Pillow==2.4.0 +Pillow>=2.7.0