From: Juho S. <juh...@as...> - 2005-11-07 12:14:47
|
On Mon, 7 Nov 2005, Noel O'Boyle wrote: >Problem: > >On Windows, if your user name contains an apostrophe, the use of >temporary files causes an error, as gnuplot uses apropostrophes (i.e. >single quotes) to delimit the filename. > >gnuplot> plot 'c:\docume~1\noelo'~1\locals~1\temp\tmpcxnwsm' notitle > ^ > invalid character > > >Solution: > >If you replace the single quotes with double quotes, gnuplot is happy >with the apostrophe but misinterprets the backslashes as escape >character sequences. > >gnuplot> plot "c:\docume~1\noelo'~1\locals~1\temp\tmpcxnwsm" notitle > ^ > can't read data file "c:docume~1 >oelo'~1locals~1 emp mpcxnwsm" > >....so you need to also replace all of the backslashes with forward >slashes. Or you could use raw strings: r"c:\docume~1\noelo'~1\locals~1\temp\tmpcxnwsm" So python treats \ in the string just like any other character. -- Juho Schultz e-mail: juh...@as... www.astro.helsinki.fi/~jschultz Observatory P.O. Box 14 FIN-00014 University of Helsinki FINLAND |