Try to open a file through python

Hi Ben, you mean the quotes?

In python a string can be defined both by double quotes and single quotes:


foo = 'string in single quotes'
bar = "string in double quotes"

This leaves the option to use either single or double quotes inside the string as non-special characters


foo = 'string "quoted inside" '
bar = "string 'quoted inside' "

Passing a path in the Rhino commandline will work fine without double quotes, except when there is a space character in the path eg:
D:\test\test file with spaces.stl

Passing that as a string without double quotes will make Rhino catch the space as an enter and you will end up with Rhino not being able to make sense of the input.

So to circumvent that you can define a command string in python with single quotes and inside it, put the path in double quotes, making sure Rhino will interpret the part in between double quotes as a single entity input.

Does this answer your question?

-Willem