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?
#18
tozqo, thank you for the input. If I run the code posted in the beginning, it will work only until the program gets to the os._exit(1). We are trying to use the Pdb class to skip this line, but that is where I am having issues. For some reason if I initialize stack =pdb.Pdb() and then try to call stack.do_jump(line=11) I get the attribute error stated above. Do you have any ideas why it would say AttributeError: 'Pdb' object has no attribute 'curindex'? (For continuity sake, I made my code look similar to the one in the initial post so we could all brainstorm how to work past the conceptual problem)

frame = inspect.currentframe()
stack = pdb.Pdb()
def tracefunc(frame, event, arg):

    if event == "line":
        if frame.f_code.co_name == 'game_over':
           func = frame
           print("============"+func.f_code.co_name+"==============")
           stack.do_jump(11)

    return tracefunc
   
sys.settrace(tracefunc)
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