Space on path


I have this simple code to import some file to rhino, the path is correct
but “Program Files” have a space, this cause problems on comand
import, there is any way to sove this?

path = “C:\Program Files\data\teste\file.3dm”

commandline = “_-Import " + path + " _Enter”

ok = rs.Command(commandline)

thank you

Hi @ricardo.eira,


path = "C:\\Program Files\\data\\teste\\file.3dm"
path = "\"" + path + "\"" # Escape the double quotes
print path

– Dale

Hello Dale,

The problem is not //, the problem this the space between “Program” and “Files”, this space
cause path interruption.

“C:\Program.3dm not found, unable open”


Note the espaced double quotes in the sample from @dale. Those will ensure proper path.

OK, I was doing rong, is solve thank you.