View Single Post
Old 11-05-2013, 04:52 AM   #17
aleyx
Addict
aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.
 
Posts: 250
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Bookeen Diva, Kobo Clara BW
Good to know, thanks!

I'd put that in a -c one-liner, but sys.exit() seems to hiccup when used that way. I'll find a way.

Code:
#!/usr/bin/env python
## -*- coding: utf-8 -*-
import urllib as u
from calibre.constants import numeric_version

if numeric_version < tuple(map(int, u.urlopen('http://calibre-ebook.com/downloads/latest_version').read()[:-1].split("."))):
        sys.exit(0)
else:
        sys.exit(1)
aleyx is offline   Reply With Quote