def run(subcommand): func = functions[subcommand][0] if not os.path.isdir(BUILD_DIR): os.mkdir(BUILD_DIR) if not os.path.isfile(MM_Z80): tap2sna.main(('-d', BUILD_DIR, '@{}/manic_miner.t2s'.format(MANICMINER_HOME))) ctlfile = '{}/{}.ctl'.format(BUILD_DIR, subcommand) with open(ctlfile, 'wt') as f: f.write(func(get_snapshot(MM_Z80))) sna2skool.main(('-c', ctlfile, MM_Z80))
def run(subcommand): func = functions[subcommand][0] if not os.path.isdir(BUILD_DIR): os.mkdir(BUILD_DIR) if not os.path.isfile(MM_Z80): tap2sna.main( ('-d', BUILD_DIR, '@{}/manic_miner.t2s'.format(MANICMINER_HOME))) ctlfile = '{}/{}.ctl'.format(BUILD_DIR, subcommand) with open(ctlfile, 'wt') as f: f.write(func(get_snapshot(MM_Z80))) sna2skool.main(('-c', ctlfile, MM_Z80))
def run(subcommand): func = functions[subcommand][0] if not os.path.isdir(BUILD_DIR): os.mkdir(BUILD_DIR) if not os.path.isfile(MM_Z80): tap2sna.main(("-d", BUILD_DIR, "@{}/manic_miner.t2s".format(MANICMINER_HOME))) ctlfile = "{}/{}.ctl".format(BUILD_DIR, subcommand) with open(ctlfile, "wt") as f: f.write(func(get_snapshot(MM_Z80))) stdout = sys.stdout sys.stdout = StringIO() sna2skool.main(("-c", ctlfile, MM_Z80)) skool = sys.stdout.getvalue() sys.stdout = stdout for line in skool.split("\n")[2:-1]: print(line)
def run(subcommand): func = functions[subcommand][0] if not os.path.isdir(BUILD_DIR): os.mkdir(BUILD_DIR) if not os.path.isfile(MM_Z80): tap2sna.main( ('-d', BUILD_DIR, '@{}/manic_miner.t2s'.format(MANICMINER_HOME))) ctlfile = '{}/{}.ctl'.format(BUILD_DIR, subcommand) with open(ctlfile, 'wt') as f: f.write(func(get_snapshot(MM_Z80))) stdout = sys.stdout sys.stdout = StringIO() sna2skool.main(('-c', ctlfile, MM_Z80)) skool = sys.stdout.getvalue() sys.stdout = stdout for line in skool.split('\n')[2:-1]: print(line)
#!/usr/bin/env python3 # Copyright 2013, 2017 Richard Dymond ([email protected]) # # This file is part of SkoolKit. # # SkoolKit is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # SkoolKit is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # SkoolKit. If not, see <http://www.gnu.org/licenses/>. import sys from skoolkit import tap2sna, error, SkoolKitError try: tap2sna.main(sys.argv[1:]) except SkoolKitError as e: error(e.args[0])
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013 Richard Dymond ([email protected]) # # This file is part of SkoolKit. # # SkoolKit is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # SkoolKit is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # SkoolKit. If not, see <http://www.gnu.org/licenses/>. import sys from skoolkit import tap2sna, error, SkoolKitError try: tap2sna.main(sys.argv[1:]) except SkoolKitError as e: error(e.args[0])