PDA

View Full Version : Unexpected carriage return


vizmaster
01-18-2007, 12:59 PM
When adding a texture from a file any \r in the filename is seen as a carriage return.
C:\Tester\retest is seen as C:\Tester\
etest
To get around this I either add a different character to the before the "r" or an additional \. Is this suppose to be how it works? :confused:

farshizzo
01-18-2007, 01:05 PM
You can also use the following to allow backslashes in strings:path = r'C:\Tester\retest'Placing an r before the string tells python not to translate backslash expressions.

farshizzo
01-18-2007, 01:09 PM
Forgot to mention, you can also use forward slashes.

vizmaster
01-23-2007, 12:46 PM
Thanks,
I will give the suggestions a try. I forget the I am dealing with an interpretive language.