[issue44415] sys.stdout.flush and print() hanging

2021-06-15 Thread Rajeev Chaurasia
Rajeev Chaurasia added the comment: Thanks a lot Serhiy. Your suggested fix resolved the issue. -Rajeev -- stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue44415] sys.stdout.flush and print() hanging

2021-06-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not know what are lib.logger.Log and lib.debugger.Tee, but I guess that lib.logger.Log() creates a logger which writes to sys.stdout, and lib.debugger.Tee() is a file-like object which writes to the specified file and to standard output. Standard out

[issue44415] sys.stdout.flush and print() hanging

2021-06-14 Thread Rajeev Chaurasia
Rajeev Chaurasia added the comment: self.logger = lib.logger.Log() We have cronjob entry to call the application everyday $crontab -e 0 1 * * * /scratch/rajeev/cronjob/exachk.sh exachk.sh makes call to my python application as- python3 /opt/oracle.ahf/exachk/exachk.py Yes I am redirecting st

[issue44415] sys.stdout.flush and print() hanging

2021-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is self.logger and how do you run your application? Do you redirect its stdout and stderr and to where? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue44415] sys.stdout.flush and print() hanging

2021-06-13 Thread Rajeev Chaurasia
New submission from Rajeev Chaurasia : I am running an application using cronjob. This application runs on Linux(X86_64) platform where inside a loop we have print() and sys.stdout.flush() statements. This loop iterates around 500 times and after the loop we have few more sys.stdout.flush() a