> class MyUtilityClass:
>    def __init__(self, DataFilepath):
>        Resourcepath  = DataFilepath + ".rsc"
>        DataFileH     = open(DataFilepath)
>        ResourceFileH = open(Resourcepath)


There's nothing wrong with this code. You have to look elsewhere in your
program-- perhaps what calls it. Perhaps in the filesystem to ensure there
really happens to be a rsc for this data file (maybe it got accidentally
deleted?)

Before you do any openings, try printing like:

print repr(DataFilepath)
print repr(Resourcepath)
print os.path.exists(Resourcepath)
print os.listdir(os.dirname(Resourcepath))

Something must jump out at that point to be obviously the problem. If not
and you still get a traceback, try mailing the list the output and the
actual traceback.

--S
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to