From a48716a900d9c1a32027a0ed087e3e5b7f624bb1 Mon Sep 17 00:00:00 2001 From: James Tauber Date: Sat, 6 Aug 2011 17:46:38 -0400 Subject: [PATCH] added if __name__ == "__main__" test for mainline --- applepy.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/applepy.py b/applepy.py index 3d16970..a513336 100644 --- a/applepy.py +++ b/applepy.py @@ -636,10 +636,12 @@ class CPU: # @@@ IRQ # @@@ NMI -mem = Memory(0x100000) -# available from http://www.easy68k.com/paulrsm/6502/index.html -mem.load("A2ROM.BIN", 0xD000) - -cpu = CPU(mem) -curses.wrapper(cpu.run) +if __name__ == "__main__": + mem = Memory(0x100000) + + # available from http://www.easy68k.com/paulrsm/6502/index.html + mem.load("A2ROM.BIN", 0xD000) + + cpu = CPU(mem) + curses.wrapper(cpu.run)