argistasm = 1
                break

            else:
                print "Not valid."
                argisfile = 0
    if argisfile == 0 or argistasm == 0:
        #print "ERROR: file not found, or is not a tasm file STOP"
        sys.exit(
            "ERROR: SBTCVM assembler was unable to load the specified filename. STOP"
        )
    #generate a name for logs in case its needed
    #logsub=arg.replace("/", "-")
    #logsub=logsub.replace("~", "")
    #logsub=logsub.split(".")
    logsub = libSBTCVM.namecrunch(arg, "-tasm-comp.log")
    #detect if command line options specify tracelog compile mode:
    if cmd == "-t" or cmd == "--tracecompile":
        tracecomp = 1
        compilerlog = open(os.path.join('CAP', logsub), "w")
    else:
        tracecomp = 0
    #arg=arg.replace("./", "")
    #print arg
    complog("starting up compiler...\n")
    complog("TASM VERSION: SBTCVM-asm " + compvers + "\n")
    complog("source: " + arg + "\n")
    complog("---------\n\n")
    #open 2 instances of source. one per pass.
    sourcefile = open(arg, 'r')
    sourcefileB = open(arg, 'r')
Пример #2
0
  GNU General Public License for more details.
 
  You should have received a copy of the GNU General Public License
  along with SBTCVM Mark 2 tool launcher. If not, see <http://www.gnu.org/licenses/>
'''
elif cmd == None:
    print "tip: use MK2-TOOLS.py -h for help."
elif cmd == "namecrunch":
    if cmd == "namecrunch":
        import VMSYSTEM.libSBTCVM as libSBTCVM
        try:
            ncruncharg = sys.argv[2]
        except IndexError:
            ncruncharg = "thisisatest"
        print ncruncharg
        print libSBTCVM.namecrunch(ncruncharg, "-tools-test.log")
elif cmd == "about" or cmd == "btclock" or cmd == "pause" or cmd == "uicredits" or cmd == "imgview" or cmd == "textview" or cmd == "helpview" or cmd == "codeview":
    #print "SBTCVM Graphical Tools launcher starting..."
    pygame.display.init()
    pygame.font.init()

    if cmd == "uicredits":
        pygame.display.set_caption("SBTCVM Credits", "SBTCVM Credits")
    elif cmd == "imgview":
        pygame.display.set_caption("imgview", "imgview")
    elif cmd == "textview":
        pygame.display.set_caption("textview", "textview")
    elif cmd == "codeview":
        pygame.display.set_caption("codeview", "codeview")
    elif cmd == "helpview":
        pygame.display.set_caption("SBTCVM help", "SBTCVM help")