[Open_electroporator] What is a good way to make scripts not need full path? (lose /home/john/Documents/ in front of culture_shock)

John Griessen john at cibolo.com
Tue May 1 04:17:53 UTC 2018


On 04/30/2018 09:05 PM, Nathan McCorkle wrote:
> Depends on the language, Python, Bash, Makefiles?
> 
> If Python:
> import os
> print(os.path.abspath(__file__))

So far, I have used bash to launch make.


The whole culture shock repo is what I'd like to have independent of where someone copies it, and also the
micropython repository clone.

I have been using them from
/home/john/micropython
and
/home/john/Documents/EEProjects/circuitboards/culture_shock
both are git repos.

I'd like to use environment variables for linux/unix users like these:
CULTURE_SHOCK_ROOT="/home/john/Documents/EEProjects/circuitboards/culture_shock"
MPY_ROOT="/home/john/micropython"
so users would set those to their install location and then scripts would work.

Is there a way to do that for Windows and Mac?  Is the answer just to
install Cygwin or use a VM?


More information about the open_electroporator mailing list