Forum: Poser Python Scripting


Subject: PoserPython prevented from using os.system on OS X?

deastham opened this issue on Jan 20, 2015 ยท 4 posts


deastham posted Tue, 20 January 2015 at 1:04 PM

I am attempting to run tdlmake to convert a texture to TDL format. ("tdlmake inputtexturepath outputtexturepath" (where they were given values such that copying and pasting the whole string worked as a command in Terminal).

When I am in the PoserPython shell in Poser Pro 2012, I can run os.system("echo hello world") and it returns the exit code of 0 to the shell output, but if I attempt to run a command that requires an environment variable, it returns a non-zero error code. Even just os.system("echo $DELIGHT") (which returns the path in a real Terminal session) gives the same error code 32512. For what I am doing now, I can just store a variable in the script with that information, and now that I realize halfway through this reply what's going on, I can hopefully find the solution in a more general Python resource.

Thanks Paolo. :)