Python Shell and PythonSOP produce different results

   856   2   2
User Avatar
Member
120 posts
Joined: Jan. 2012
Offline
Hi,

When I type this in Python Shell

>>> print '$HIP'
>>> '$HIP'

When I do the same thing in PythonSOP, string gets expanded. Why?!

>>> print '$HIP'
>>> C:/blabla

How can I avoid string expansion in PythonSOP?
Thank you
Edited by tas3d - March 29, 2021 14:57:14
Michal Tas Maciejewski @ www.vfxtricks.com
User Avatar
Member
191 posts
Joined: Oct. 2018
Offline
I'm just guessing the python sop already has access to environment variables while the shell doesn't. You can get around it evaluating though if you type:

print "\$HIP"
User Avatar
Member
120 posts
Joined: Jan. 2012
Offline
Thanks!
Those special characters always causing trouble
Michal Tas Maciejewski @ www.vfxtricks.com
  • Quick Links