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

Nathan McCorkle nmz787 at gmail.com
Tue May 1 02:05:02 UTC 2018


Depends on the language, Python, Bash, Makefiles?

If Python:
import os
print(os.path.abspath(__file__))
#prints the full path of the file this code is saved in



On Mon, Apr 30, 2018, 5:56 PM John Griessen <john at cibolo.com> wrote:

> I'm wanting to clean up my messy methods of hacking so the repo can be
> quick to use by others...
>
> One way is to use environment variables to hold
> CULTURE_SHOCK_ROOT="/home/john/Documents/"
> and
> MPY_ROOT="~/micropython".
> That is linux unix style.
>
> What do people do that use windows and Mac?
> _______________________________________________
> open_electroporator mailing list
> open_electroporator at cibolo.us
> https://cibolo.us/mailman/listinfo/open_electroporator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cibolo.us/pipermail/open_electroporator/attachments/20180501/a802e74e/attachment.html>


More information about the open_electroporator mailing list