Hi guys.I'm doing some simple test here and curious if there's any difference between these 2?os.environ["JOEY"] = "SOMETHING"Popen( maya, shell=True )andos.environ["JOEY"] = "SOMETHING"Popen( maya, env.dict=dict(os.environ) )
1 thing I notice is that, with Shell=True, maya.exe process would appear under cmd. Does that change anything vs running under explorer.exe?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/64a6fd4e-7243-437e-8e01-a386e5f7d514%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is the security risk a thing we should be concerned in a studio environment? Im trying to set up a system that would load the correct version of plug-ins for each project by launching Maya with custom Env.
Thank you Justin! You're right env.dic was my mistake.
Is the security risk a thing we should be concerned in a studio environment? Im trying to set up a system that would load the correct version of plug-ins for each project by launching Maya with custom Env.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8efde786-eeed-48b4-bd03-51419ba44b87%40googlegroups.com.
On Tue, Nov 14, 2017, 1:53 AM Panupat Chongstitwattana <panu...@gmail.com> wrote:Thank you Justin! You're right env.dic was my mistake.
Is the security risk a thing we should be concerned in a studio environment? Im trying to set up a system that would load the correct version of plug-ins for each project by launching Maya with custom Env.It's only a concern if you generate your shell command based on arbitrary user input. And example is reading some kind of string from the command line flags and building that into your Popen command. If you are purely building the command internally and you aren't basing the command off of aliases or environment variables then its less of a risk. It's also less of a risk if it's not a privileged process.Why do you specifically need shell=True anyways? What does your command look like? If you are just building a single command to launch Maya under an env, and this program is just a bootstrap to launch Maya, then maybe what you want is on of the os.exec* functions, to exec a new program and replace the current one.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
Thank you Justin. Appreciate your input. The Shell=True was out of curiosity since I see it being used in many script examples.
On Tuesday, November 14, 2017 at 1:32:03 AM UTC+7, Justin Israel wrote:
On Tue, Nov 14, 2017, 1:53 AM Panupat Chongstitwattana <panu...@gmail.com> wrote:Thank you Justin! You're right env.dic was my mistake.
Is the security risk a thing we should be concerned in a studio environment? Im trying to set up a system that would load the correct version of plug-ins for each project by launching Maya with custom Env.It's only a concern if you generate your shell command based on arbitrary user input. And example is reading some kind of string from the command line flags and building that into your Popen command. If you are purely building the command internally and you aren't basing the command off of aliases or environment variables then its less of a risk. It's also less of a risk if it's not a privileged process.Why do you specifically need shell=True anyways? What does your command look like? If you are just building a single command to launch Maya under an env, and this program is just a bootstrap to launch Maya, then maybe what you want is on of the os.exec* functions, to exec a new program and replace the current one.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8efde786-eeed-48b4-bd03-51419ba44b87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/fa8da1bf-c587-4b14-83bb-4be6d31f75b9%40googlegroups.com.