Is this a valid quine?

Posted by fsm on Stack Overflow See other posts from Stack Overflow or by fsm
Published on 2010-06-15T17:41:08Z Indexed on 2010/06/15 17:52 UTC
Read the original article Hit count: 321

Filed under:
|
def start(fileName):
  fileReader = open(fileName)
  for row in fileReader:
    print row,

if __name__ == "__main__":
  import sys
  if len(sys.argv) <= 1:
    print "usage quine /path/to/file"
    sys.exit(-1)
  fileName = sys.argv[0]
  start(fileName)

python quine.py foo

© Stack Overflow or respective owner

Related posts about python

Related posts about quine