bc90021 <[EMAIL PROTECTED]> wrote:

> On Sun, 11 May 2008 19:55:31 +0000, Duncan Booth wrote:
> 
>> 7stud <[EMAIL PROTECTED]> wrote:
>> 
>> 
>>>                             tempfileName =
>>> "\"proctemp\\"                             +
>>> self.matrix[c][0] + "_other.txt\""
>> 
>> It wouldn't exactly result in either of the error messages you
>> posted, but I expect the spurious quote marks round the filename will
>> be giving you problems.
>> 
>> Surely you want the filename to be something like
>> 'proctemp\fred_other.txt' rather than '"proctemp\fred_other.txt"'
>> with the spurious double quotes?
> 
> Yup, that's what it was.  I figured it out two seconds before this
> post.  However, it will be interesting to see how it handles files
> with spaces in the name...
> 
It will handle spaces just fine.

You need to try and understand the difference between passing arguments to 
a program, where the shell will try to parse the command line into separate 
arguments so spaces have to be escaped somehow, and calling a function 
within a program where no such parsing takes place.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to