<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: print(flush = True) not working in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/103848#M41574</link>
    <description>&lt;P&gt;did you ever figure this out? is it because of map? I'm having the same problem..&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2025 01:09:02 GMT</pubDate>
    <dc:creator>drourke</dc:creator>
    <dc:date>2025-01-02T01:09:02Z</dc:date>
    <item>
      <title>print(flush = True) not working</title>
      <link>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/12963#M7707</link>
      <description>&lt;P&gt;Hello,  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following minimum example working example using multiprocessing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from multiprocessing import Pool
&amp;nbsp;
files_list = [('bla', 1, 3, 7), ('spam', 12, 4, 8), ('eggs', 17, 1, 3)]
&amp;nbsp;
&amp;nbsp;
def f(t):
  print('Hello from child process', flush = True)
  
  name, a, b, c = t
  return (name, a + b + c)
&amp;nbsp;
def main():
  pool = Pool(processes=3) # set the processes max number 3  
  result = pool.map(f, files_list)
  pool.close()
  pool.join()
  print('end')
  print(result)
&amp;nbsp;
if __name__ == "__main__":
  main()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I cannot get anything from the child process to print. The aim is use the text for debugging purposes in the future. Any idea why this does not work or if there are any alternative solution to this? Thank you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 05:50:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/12963#M7707</guid>
      <dc:creator>tanjil</dc:creator>
      <dc:date>2023-01-09T05:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: print(flush = True) not working</title>
      <link>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/12965#M7709</link>
      <description>&lt;P&gt;No errors are generated. The code executes successfully, but there the print statement for "Hello from child process" does not work. &lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 09:58:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/12965#M7709</guid>
      <dc:creator>tanjil</dc:creator>
      <dc:date>2023-01-10T09:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: print(flush = True) not working</title>
      <link>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/12964#M7708</link>
      <description>&lt;P&gt;Hi, Do you receive any error when you say it is not working?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 22:27:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/12964#M7708</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-01-09T22:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: print(flush = True) not working</title>
      <link>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/103848#M41574</link>
      <description>&lt;P&gt;did you ever figure this out? is it because of map? I'm having the same problem..&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 01:09:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/103848#M41574</guid>
      <dc:creator>drourke</dc:creator>
      <dc:date>2025-01-02T01:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: print(flush = True) not working</title>
      <link>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/103862#M41578</link>
      <description>&lt;P&gt;nm (discovered queue)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 06:56:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/print-flush-true-not-working/m-p/103862#M41578</guid>
      <dc:creator>drourke</dc:creator>
      <dc:date>2025-01-02T06:56:56Z</dc:date>
    </item>
  </channel>
</rss>

