Skip to content Skip to sidebar Skip to footer

Setting $env{variable} When Calling Python

I'm new to Python and would like reproduce a convenience I used when working in Perl. When calling a Perl script I usually set some $ENV variables (like VERBOSE, DEVELOP and DEBUG)

Solution 1:

They are accessible via the os.environ dictionary.

os.environ['VERBOSE']

Post a Comment for "Setting $env{variable} When Calling Python"