Python Forum
I need a win! (HELP!) PLZ?
Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need a win! (HELP!) PLZ?
#8
Are there any rules as to what you can/can't do?  You could just re-bind os._exit so it does nothing...
>>> import os
>>> def run_me():
...     print("spam")
...     os._exit(1)
...     print("shouldn't happen")
...
>>> def main():
...     exit = os._exit
...     os._exit = lambda status: None
...     run_me()
...     os._exit = exit
...
>>> main()
spam
shouldn't happen
Reply


Messages In This Thread
I need a win! (HELP!) PLZ? - by Spihdur - Jul-06-2017, 05:14 PM
RE: I need a win! (HELP!) PLZ? - by nilamo - Jul-06-2017, 08:07 PM
RE: I need a win! (HELP!) PLZ? - by Spihdur - Jul-06-2017, 09:28 PM
RE: I need a win! (HELP!) PLZ? - by ichabod801 - Jul-06-2017, 10:02 PM
RE: I need a win! (HELP!) PLZ? - by nilamo - Jul-06-2017, 10:06 PM
RE: I need a win! (HELP!) PLZ? - by ichabod801 - Jul-07-2017, 12:28 AM
RE: I need a win! (HELP!) PLZ? - by Spihdur - Jul-07-2017, 05:02 PM
RE: I need a win! (HELP!) PLZ? - by nilamo - Jul-07-2017, 05:36 PM
RE: I need a win! (HELP!) PLZ? - by Spihdur - Jul-07-2017, 07:15 PM
RE: I need a win! (HELP!) PLZ? - by nilamo - Jul-07-2017, 08:13 PM
RE: I need a win! (HELP!) PLZ? - by thesandmanx - Jul-07-2017, 09:02 PM
RE: I need a win! (HELP!) PLZ? - by Spihdur - Jul-07-2017, 09:08 PM
RE: I need a win! (HELP!) PLZ? - by thesandmanx - Jul-08-2017, 06:11 PM
RE: I need a win! (HELP!) PLZ? - by Spihdur - Jul-08-2017, 06:44 PM
RE: I need a win! (HELP!) PLZ? - by thesandmanx - Jul-08-2017, 06:50 PM
RE: I need a win! (HELP!) PLZ? - by X_Wing - Jul-09-2017, 10:51 PM
RE: I need a win! (HELP!) PLZ? - by tozqo - Jul-10-2017, 04:14 AM
RE: I need a win! (HELP!) PLZ? - by X_Wing - Jul-10-2017, 10:12 PM

Forum Jump:

User Panel Messages

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