From cdac4741154ed99afbc8740ca2f38f9fa62cd678 Mon Sep 17 00:00:00 2001 From: rasbt Date: Fri, 6 Feb 2015 15:09:13 -0500 Subject: [PATCH] shell cmd upd --- useful_scripts/large_csv_to_sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/useful_scripts/large_csv_to_sqlite.py b/useful_scripts/large_csv_to_sqlite.py index 5e67691..8edba57 100644 --- a/useful_scripts/large_csv_to_sqlite.py +++ b/useful_scripts/large_csv_to_sqlite.py @@ -21,7 +21,7 @@ chunksize = 100000 # number of lines to process at each iteration columns = ['molecule_id','charge','db','drugsnow','hba','hbd','loc','nrb','smiles'] # Get number of lines in the CSV file -nlines = subprocess.check_output('wc -l %s' % in_csv, shell=True) +nlines = subprocess.check_output(['wc', '-l', in_csv]) nlines = int(nlines.split()[0]) # connect to database