EOL - scanning single-quoted string

A

Ajay

hi!

I am developing an application for a pocket pc.
i have a small gui which allows users to select files using a file dialog
box. however the file, selected is represented as '/My Documents/test'
which when i try to open gives me an error.
so what i would like to do is replace '/' by the windows '\'
however when i try
str='/My Documents/test'
re.subn('/', '\', str)

i get an error saying - SyntaxError: EOL while scanning single-quoted
string

how can i replace the slashes.

thanks

cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top