Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Try/Exept prints only ones
#9
In my original post (and the one the flows) I have a problem with the print statement in TRY/EXCEPT block.

I cannot execute multiple prints,
                try :
                    print ("-- Count of 'Error - 0' Errors -- "+ str(cnttt)+" --->>>  "+lstt0[-1]+"\n")
                    print ("-- Count of 'Error - 1' Errors -- "+ str(cntt1)+" --->>>  "+lstt1[-1]+"\n")                    
                except Exception as ex:
                    print(ex)
Only one print executed.

I'd like to print all my prints. I found I can add more TRY/EXCEPT with one print statement.
I just do not want to have 10 it 15 of them in the script.

So. How I can get multiple print statements in one try/except block?

Sorry for the confusion!
And thank you!
Reply


Messages In This Thread
Try/Exept prints only ones - by tester_V - Nov-01-2020, 04:13 AM
RE: Try/Exept prints only ones - by bowlofred - Nov-01-2020, 04:40 AM
RE: Try/Exept prints only ones - by tester_V - Nov-01-2020, 05:52 AM
RE: Try/Exept prints only ones - by tester_V - Nov-01-2020, 06:11 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-01-2020, 10:14 PM
RE: Try/Exept prints only ones - by tester_V - Nov-02-2020, 01:58 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-02-2020, 03:41 AM
RE: Try/Exept prints only ones - by tester_V - Nov-02-2020, 03:44 AM
RE: Try/Exept prints only ones - by tester_V - Nov-02-2020, 03:56 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-02-2020, 04:00 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-02-2020, 04:25 AM
RE: Try/Exept prints only ones - by tester_V - Nov-03-2020, 02:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  zfill prints extra et the end of a var tester_V 4 963 Mar-24-2023, 06:59 PM
Last Post: tester_V
  variable prints without being declared. ClockPillow 2 1,859 Jul-11-2021, 12:13 AM
Last Post: ClockPillow
  Output prints Account.id at the end? LastStopDEVS 5 2,877 Dec-19-2020, 05:59 AM
Last Post: buran
  loop only prints last character. mcmxl22 1 1,755 Feb-17-2020, 02:36 AM
Last Post: menator01
  can you understand why this code prints None? arcbal 2 2,802 Mar-13-2019, 02:57 AM
Last Post: arcbal
  What for a file that prints nothing sylas 1 2,216 Sep-12-2018, 01:18 PM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020