これの何が問題なのですか?(そして、私は初心者なので、複雑なことは何もしないでください!)
#!usr/bin/python
import os
import sys
import pdb
import time
import array
red = chr(00), chr(00), chr(255)
blue = chr(255), chr(00), chr(00)
print "Monochrome Bitmap Color Changer"
print "Supported colors: "
print "Black, White, Blue, Red, Yellow,"
print "Green, Orange, Purple, Pink, Brown, Grey"
print ""
filename = raw_input("Please enter filename or directory of monochrome bitmap: ")
whitevalue = raw_input("Change all white pixels to? ")
blackvalue = raw_input("Change all black pixels to? ")
with open (filename, 'r+b') as f:
f.seek(54)
if whitevalue is "red" or "Red":
f.write(red)
elif whitevalue is "blue" or "Blue":
f.write(blue)
f.seek(58)
if blackvalue is "red" or "Red":
f.write(red)
elif blackvalue is "blue" or "Blue":
f.write(blue)
exit
#print "Done"
#time.sleep(3)
#exit
2f.write(red)
行目以降、赤みがかったピンク色のハイライトが表示され、次のように表示されます。
'unindent は外側のインデント レベルと一致しません'
これは何を意味し、どのようにそれを助けたり修正したりできますか?
どうもありがとうございました!