Re: trouble using "\" as a string

2006-08-20 Thread Ant
> such as tempname="\"..it says that the line is single qouted. The others have addressed the escape issue I think. However it looks like you want the funtionality of the os.path module. For example: >>> import os.path as path >>> filename = "/home/ant/test.sh" >>> filename2 = r"c:\python24\scri

Re: trouble using "\" as a string

2006-08-20 Thread Justin Azoff
OriginalBrownster wrote: > 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. sounds like you want import pos

Re: trouble using "\" as a string

2006-08-19 Thread Dan Bishop
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 qo

Re: trouble using "\" as a string

2006-08-19 Thread OKB (not okblacke)
OriginalBrownster wrote: [I un-bottom-posted this] > Jim wrote: >> Try using: tempname = "\\" >> Jim > that stores tempname as "\\" > > .. I don't think so. I think you just think it's storing it as that because if you enter it at the interactive prompt it shows '\\'. But try len(temp

Re: trouble using "\" as a string

2006-08-19 Thread OriginalBrownster
that stores tempname as "\\" .. Jim wrote: > 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 > > us

Re: trouble using "\" as a string

2006-08-19 Thread Jim
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="\"..i

trouble using "\" as a string

2006-08-19 Thread OriginalBrownster
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