trouble using "\" as a string

Jim jscrerar at compuserve.com
Sat Aug 19 18:01:39 EDT 2006


Try using: tempname = "\\"
Jim


OriginalBrownster wrote:
> Hi there...
>
> I'm still pretty new to turbogears. but i have gotten pretty familiar
> with it
>
> i'm just trying to clear something up, i'm having a difficult time
> using \ when declaring a string expression
>
> such as tempname="\"..it says that the line is single qouted.
>
> i want this because using python I am pulling in filenames from a
> mac..thus they are "/" in the pathways..and i want to .split it at the
> "/" to obtain the filename at the end...but its proving diffucult with
> this obstacle in the way.
> 
> Why is this happening??




More information about the Python-list mailing list