Skip to content

Instantly share code, notes, and snippets.

@joshuataylor
Last active August 4, 2024 02:56
Show Gist options
  • Save joshuataylor/061148102103a0f8289961bf613dde5d to your computer and use it in GitHub Desktop.
Save joshuataylor/061148102103a0f8289961bf613dde5d to your computer and use it in GitHub Desktop.
misepython
export FOOHELLO="world"
[env]
mise.file = '.envrcs'
[tools]
python = {version='3.12.4', virtualenv='.venv'}
git clone https://gist.github.com/joshuataylor/061148102103a0f8289961bf613dde5d misep
cd misep
mise trust
# install python
mise install
python foo.py

now open pycharm.

import os
# Get the value of the FOOHELLO environment variable
foohello_value = os.getenv('FOOHELLO')
# Check if the environment variable exists
if foohello_value is not None:
print(f'The value of FOOHELLO is: {foohello_value}')
exit(0)
else:
print('The FOOHELLO environment variable is not set.')
exit(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment