escape apostrophe in cycling '74 file path

Jun 21, 2013 at 2:12pm

escape apostrophe in cycling '74 file path

Im going round in circles here. Im trying to format the file path to the “C:/Program Files (x86)/Cycling ’74/Max 6.1/Cycling ’74/” folder, in order to send it to Jython as a exec statement

Jython wont accept this surrounded by quotes:
exec X = “C:/Program Files (x86)/Cycling ’74/Max 6.1/Cycling ’74/”

So I try to wrap it with apostrophes. Jython wont accept this because there is an apostrophe in the path already

exec X = ‘C:/Program Files (x86)/Cycling ’74/Max 6.1/Cycling ’74/’

So Im trying to find a way to escape the apostrophe using a backslash, but regexp wont let me, because backslash is used by regexp for escaping.

Im hitting a brick wall here and would really appreciate any ideas.

Cheers

#253657
Jun 21, 2013 at 8:22pm

double-backslash through regexp? does that allow it? some Max formatting requires this.

Strange that the first version won’t work, I thought anything in double quotes would be fine. I don’t know Jython though.

#253687

You must be logged in to reply to this topic.