title: How can I change this code to make the progress bars appear for each file and the iteration be each loop?
body: <p>I am struggling with getting <code>tqdm</code>'s progress bar to stay and update as opposed to write to a new line. Note: I am using <code>multiprocessing</code> to parallelize my code, and <code>tqdm</code> is inside the function I am parallelizing. </p>
  
  <p>I added a <code>print</code> statement so the files will all appear in my terminal when running the program. Reproducible example below:</p>
  
  <pre class="lang-py prettyprint-override"><code>import multiprocessing
  import time
  
  from tqdm import tqdm
  from joblib import Parallel, delayed
  
  
  def run_file_analysis(text):
      cool = []
      for i in tqdm(range(0, 10), position = 0, leave = True, desc = f'Text : {text}'):
          print('')
          cool.append(i)
          time.sleep(1)
  
  num_cores = multiprocessing.cpu_count()
  ls = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
  
  if __name__ == "__main__":
      processed_list = Parallel(n_jobs=num_cores)(delayed(run_file_analysis)(i) for i in ls)
  </code></pre>
  
  <p>Current output: 
  <a href="https://i.stack.imgur.com/jfzLm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jfzLm.png" alt="enter image description here"></a></p>
  
  <p>The desired output would be the ten text objects - 1, 2, 3, ... , 10 and a corresponding updating progress bar for each. Not 100 different ones. I have tried following many stackoverflow questions relating to the topic of <code>tqdm</code> and <code>multiprocessing</code> integration, but none of them are as straightforward as I would like them to be. Any help would be appreciated. </p>