Advertisement
pushrbx

Untitled

May 22nd, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. #! /usr/bin/env python
  2. # -*- coding: utf8 -*-
  3.  
  4. import os, sys
  5.  
  6. class Interpreter(object):
  7.     def __init__(self):
  8.         self.line = ""
  9.         self.commands = list()
  10.  
  11.     def parse(self, text):
  12.         self.line = text
  13.         strt = text.split(" ::: ");
  14.  
  15. file = sys.argv[1]
  16. try: f = open(file, "r")
  17. except: print "A megadott inputfajl nem letezik!"
  18. else:
  19.     p = Interpreter()
  20.     for line in f:
  21.         if not line:
  22.             continue
  23.  
  24.         p.parse(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement