I run this script and still get the errors. I think the problem is
elsewhere but how know?

import codecs
import os

DIR = r"F:\Proyectos\Python\jhonWeb\shared\core\templates\core"

arc=os.listdir(DIR)

def write(file,text):
    # Open a UTF-8 file in read mode
    infile = codecs.open(file, "w", "utf-8")
    infile.write(text)
    # Close the file.
    infile.close()

def read(file):
    # Open a UTF-8 file in read mode
    infile = codecs.open(file, "r", "utf-8")
    # Read its contents as one large Unicode string.
    text = infile.read()
    # Close the file.
    infile.close()

    return text

for file in arc:
    if file<>'.svn':
        file = '%s\\%s' % (DIR,file)
        print "convirtiendo a %s" % file
        write(file,read(file))


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to