(self, para = None)
| 28 | (str, 'url', 'Url:', '')] |
| 29 | |
| 30 | def run(self, para = None): |
| 31 | try: |
| 32 | fp, fn = os.path.split(para['url']) |
| 33 | fn, fe = os.path.splitext(fn) |
| 34 | response = urlopen(para['url']) |
| 35 | ## TODO: Fixme! |
| 36 | stream = StringIO(response.read()) |
| 37 | img = imread(stream) |
| 38 | IPy.show_img([img], fn) |
| 39 | except Exception as e: |
| 40 | IPy.write('Open url failed!\tErrof:%s'%sys.exc_info()[1]) |
| 41 | |
| 42 | plgs = [OpenFile, OpenUrl] |
| 43 |
no test coverage detected