Reading text file with wierd file extension?
apt.shansen at gmail.com
Mon Feb 2 16:29:55 EST 2009
> 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
Before you do any openings, try printing like:
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list