Using environment variables in Python -



Using environment variables in Python -

i have environment variable called %ccdeviceid%. when run command using python in command prompt, want able utilize variable, , including %ccdeviceid% in script doesn't work. how can implement environment variables python script?

thanks ed

use os.environ:

import os print os.environ['ccdeviceid']

python variables environment

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -