Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf8 -*-
- import os, sys
- class Interpreter(object):
- def __init__(self):
- self.line = ""
- self.commands = list()
- def parse(self, text):
- self.line = text
- strt = text.split(" ::: ");
- file = sys.argv[1]
- try: f = open(file, "r")
- except: print "A megadott inputfajl nem letezik!"
- else:
- p = Interpreter()
- for line in f:
- if not line:
- continue
- p.parse(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement