EOL - scanning single-quoted string

Discussion in 'Python' started by Ajay, Aug 4, 2004.

  1. Ajay

    Ajay Guest


    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

    how can i replace the slashes.


    Ajay, Aug 4, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.