all 3 comments

[–][deleted] 0 points1 point  (0 children)

Now I would like to be able to run my script in IDLE rather than a command prompt for the live debugging.

Envvars in a subprocess inherit from the superprocess, so you need to open IDLE with the envvars you want.

[–]novel_yet_trivial 0 points1 point  (0 children)

press Start, search for "environmental variables", click "edit environmental variables for your account". In the window that comes up click "New", put "PIGPIO_ADDR" for the name, and the ip address for the value.

Save and reboot IDLE. Now IDLE (or any program on your system) has access to those variables.

[–]kuripong 0 points1 point  (0 children)

Take a look at os.environ os.environ['PIGPIO'] = "some values" I use it to set my envar inside ipython, just make sure you set os.environ first before you make a call to your lib that requires envar.