Advertisement
Techmo

PCOSIMG

Mar 24th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. from __future__ import print_function
  2. __author__ = 'Brad'
  3. from colorama import init, Fore, Back
  4. import os
  5. init(autoreset=True)
  6. file = open("img.PCIF", "r+")
  7. imgData = file.read()
  8. lines = tuple(open("img.PCIF", 'r'))
  9. for m in range(0, len(lines)):
  10.     print
  11.     for i in range(0, len(lines[m])):
  12.         currentData = lines[m]
  13.         if currentData[i] == "1":
  14.             print(Back.RED + " ", end=""),
  15.         elif currentData[i] == "2":
  16.             print(Back.GREEN + " ", end=""),
  17.         elif currentData[i] == "3":
  18.             print(Back.BLUE + " ", end=""),
  19.         else:
  20.             print(""),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement