Reference pipeline properties from python in a Script Snap

I’d like to be able to reference pipe.projectPath in a python script, in a Script Snap? Is this possible?..what is the syntax?

I can’t think of a way to do that directly, but what if you were to use a Mapper snap to add the value of that variable to the input document of the Script snap?

Thanks. That is what I did