[EMAIL PROTECTED] wrote:
#!/cbi/prg/python/current/bin/python
# -*- coding: iso-8859-1 -*-
import sys
import os
from progadn import *
...
for x in extseq:
     f = open(x, "r")
     seq=f.read()
     f.close()
     s=seq

def checkDNA(seq):
    ...

seq=checkDNA(seq)
print seq

You terminated the loop to define checkDNA.

What you want is:
    ...
    from progadn import *
    def checkDNA(seq):
        ...

    ...
    for x in extseq:
        f = open(x, "r")
        seq=f.read()
        f.close()
        s=seq
        seq = checkDNA(seq)
        print seq

Even better might be:
    ...
    from progadn import *
    def checkDNA(seq):
        ...

    def main():
        ...
        for x in extseq:
            f = open(x, "r")
            try:
                print checkDNA(f.read())
            finally:
                f.close()


if __name__ = '__main__': main()

--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to