Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
escape single quote
#1
Hi all,
I'm trying to do a simple chdir in IDLE, 2.7.5.

os.chdir(r'\\hilltop3\users$\LongRandy\My Documents\HOW-TO\'S)
I keep getting, "The system cannot find the path specified: "\\\\hilltop3\\users$\\LongRandy\\My Documents\\HOW-TO\\'s"

I did use the "\" single backslash just to try it and it does work if I'm just printing something.

Not sure what I'm getting wrong.

Any help is appreciated.
"Human history becomes more and more a race between education and catastrophe." - H. G. Wells (1866-1946)
Reply


Messages In This Thread
escape single quote - by deep_logic - Sep-10-2019, 06:30 PM
RE: escape single quote - by SheeppOSU - Sep-10-2019, 08:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  use of escape character in re.sub and find WJSwan 1 945 Feb-16-2023, 05:19 PM
Last Post: Larz60+
  python sql query single quote in a string mg24 1 1,120 Nov-18-2022, 08:01 PM
Last Post: deanhystad
  Escape indentation Frankduc 11 3,171 Jan-31-2022, 02:41 PM
Last Post: Frankduc
  add Escape charcters in string GrahamL 3 1,213 Jan-20-2022, 01:15 PM
Last Post: GrahamL
  Escape Single quotation between each content tag usman 3 2,870 May-02-2021, 03:32 PM
Last Post: snippsat
  DIY Escape Room for fun StannemanPython 1 2,353 Feb-17-2021, 10:53 PM
Last Post: maurom82
  How to escape OrderedDict as an argument? Mark17 2 2,058 Dec-23-2020, 06:47 PM
Last Post: Mark17
  How to double quote filenames (spaces)? Winfried 2 3,514 Jan-25-2020, 09:39 PM
Last Post: Winfried
  help for escape sequences NewPi 1 2,069 Dec-11-2019, 11:22 PM
Last Post: ichabod801
  The use of escape char \ hishamzero1 2 2,402 Aug-12-2019, 10:20 PM
Last Post: hishamzero1

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020