Pathname problem
Just
just at xs4all.nl
Tue Apr 8 15:33:20 EDT 2003
In article <3e9321b5$1 at rmcnt03a.rmc.ca>, bourassa <bourassa-m at rmc.ca>
wrote:
> Hi there. I am just trying to load files using PIL. I get the following:
>
> im=Image.open("C:\MATLAB6p1\toolbox\pout.tif")
> Traceback (most recent call last):
> File "<pyshell#13>", line 1, in ?
> im=Image.open("C:\MATLAB6p1\toolbox\pout.tif")
> File "C:\Python22\Lib\site-packages\PIL\Image.py", line 1479, in open
> fp = __builtin__.open(fp, "rb")
> IOError: [Errno 2] No such file or directory:
> 'C:\\MATLAB6p1\toolbox\\pout.tif'
>
> I have stepped through and if the file in C:\ or C:\MATLAB6p1 it loads
> with no problem. The minute I try to get it out of "toolbox" (which
> exists) I get the above error. I'm using PIL-1.1.4a3.win32 on a Win2K
> PIV. TIA.
Try to use forward slashes or raw strings (r"..."). "\toolbox" actually
expands to "<TAB>oolbox" ;-)
Just
More information about the Python-list
mailing list