From 3735ff819972d5ebf7cec56738b2ccfdaf6f2bad Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Tue, 24 Mar 2015 13:56:46 +0100 Subject: [PATCH] Make a warning --- EMSL_api.py | 6 ++++-- src/EMSL_dump.py | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/EMSL_api.py b/EMSL_api.py index e7291bc..32f1def 100755 --- a/EMSL_api.py +++ b/EMSL_api.py @@ -84,10 +84,12 @@ if __name__ == '__main__': if arguments["--average_mo_number"]: for name, des, avg in l: - print "- '{0}' ({1}) || {:<50}".format(name, avg, des) + des_str = "{:<50}".format(des) + print "- '{0}' ({1}) || {2}".format(name, avg, des_str) else: for name, des in l: - print "- '{0}' || {:<50}".format(name, des) + des_str = "{:<50}".format(des) + print "- '{0}' || {1}".format(name, des_str) # _ _ _ _____ _ _ # | | (_) | | | ___| | | | diff --git a/src/EMSL_dump.py b/src/EMSL_dump.py index 46323ed..5e08d86 100644 --- a/src/EMSL_dump.py +++ b/src/EMSL_dump.py @@ -2,7 +2,13 @@ import os import sys import re import time -import sqlite3 + +try: + import sqlite3 +except ImportError: + print "you maybe need libsqlite3-dev from the package manager" + print "and the recompile Python" + raise from collections import OrderedDict