diff --git a/easyaccess/easyaccess.py b/easyaccess/easyaccess.py index 171ce61..9bb1410 100755 --- a/easyaccess/easyaccess.py +++ b/easyaccess/easyaccess.py @@ -34,7 +34,8 @@ import easyaccess.eautils.fun_utils as fun_utils from easyaccess.eautils.import_utils import Import -except ImportError: +except ImportError as error: + warnings.warn(str(error)) from version import __version__ from version import last_pip_version import eautils.dircache as dircache @@ -125,7 +126,7 @@ def loading(): print() cc = 0 spinner = itertools.cycle(list(range(13)) + list(range(1, 14, 1))[::-1]) - line2 = " Press Ctrl-C to abort " + line2 = " Ctrl-C to abort; " try: while True: line = list(' | |') @@ -370,6 +371,7 @@ def do_help(self, arg): else: self.do_clear(None) dl.print_deslogo(color_term) + self.stdout.write(str(self.intro) + "\n") names = self.get_names() cmds_doc = [] cmds_undoc = [] @@ -718,7 +720,7 @@ def query_and_print(self, query, print_time=True, err_arg='No rows selected', su for kf in range(len(p_functions)): data = fun_utils.updateDF(data, p_functions, p_args, p_names, kf) updated = True - rowline = ' Rows : %d, Avg time (rows/sec): %.1f ' % ( + rowline = ' Rows : %d, Rows/sec: %d ' % ( self.cur.rowcount, self.cur.rowcount * 1. / (time.time() - t1)) if self.loading_bar: sys.stdout.write(colored(rowline, 'yellow')) if self.loading_bar: sys.stdout.flush() @@ -822,7 +824,7 @@ def query_and_save(self, query, fileout, print_time=True, extra_func=None): com_it = 0 while True: data = pd.DataFrame(self.cur.fetchmany()) - rowline = ' Rows : %d, Avg time (rows/sec): %.1f ' % ( + rowline = ' Rows : %d, Rows/sec: %d ' % ( self.cur.rowcount, self.cur.rowcount * 1. / (time.time() - t1)) if self.loading_bar: sys.stdout.write(colored(rowline, 'yellow')) if self.loading_bar: sys.stdout.flush() @@ -2337,7 +2339,7 @@ def do_version(self, line): print() return - # UNDOCCUMENTED DO METHODS + # UNDOCUMENTED DO METHODS def do_EOF(self, line): # Exit program on ^D (Ctrl+D)