On Thu, Dec 21, 2017 at 15:14:01 +, Heiland, Randy wrote:
> Thanks Ben. You’re right, of course. Moreover, my idea for having
> (non-admin) users install additional Python modules (e.g., scipy) into
> PV’s dir, is a not going to go well.
Well, if `sys.path` or `PYTHONPATH` can be pointed to
> On Dec 21, 2017, at 9:34 AM, Ben Boeckel wrote:
>
> On Wed, Dec 20, 2017 at 22:50:50 +, Heiland, Randy wrote:
>> Ah, I see ‘os’ has been hijacked by PV. But something like this seems
>> to accomplish what I want, maybe…
>>
>> Create a new module for PV:
>>
>>
On Wed, Dec 20, 2017 at 22:50:50 +, Heiland, Randy wrote:
> Ah, I see ‘os’ has been hijacked by PV. But something like this seems
> to accomplish what I want, maybe…
>
> Create a new module for PV:
>
> /Applications/ParaView-5.4.1.app/Contents/Python$ more envs.py
> import os
>
Thanks Utkarsh. Yes, running pvpython from a Terminal is indeed different from
running the Python Shell in the PV app (on OS X anyway), in terms of os.environ.
Regardless, hopefully my proposed approach of creating an envs.py module in the
PV installation will work. I’m just looking for the
Randy,
No, `os` hasn't been hijacked by PV. Here's what I get on Linux.
./bin/pvpython
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ["FOO"]
'12'
I suspect it's
Ah, I see ‘os’ has been hijacked by PV. But something like this seems to
accomplish what I want, maybe…
Create a new module for PV:
/Applications/ParaView-5.4.1.app/Contents/Python$ more envs.py
import os
os.environ['PHYSICELL_DATA']=‘/fill_in_path’
and then in the PV Python shell, the
I noticed the Python shell has a very limited os.environ, e.g.:
>>> os.environ
{'SHELL': '/bin/bash', 'SSH_AUTH_SOCK':
'/private/tmp/com.apple.launchd.y86uYmHWFV/Listeners', 'XPC_FLAGS': '0x0',
'__CF_USER_TEXT_ENCODING': '0x1F5:0x0:0x0', 'Apple_PubSub_Socket_Render':