wooey / clinto

This converts an assortment of python command line interfaces into a language agnostic build spec for usage in GUI creation.
BSD 3-Clause "New" or "Revised" License
17 stars 6 forks source link

added __file__ param to exec call #25

Closed apelliciari closed 7 years ago

apelliciari commented 7 years ago

In this way it's available when the file is executed.

Obviously __file__ will not have the path of the original script uploaded through wooey's addscript, but it allows compatibility if the standalone file is using it. Besides, it provides a way to extract the project path directly from the script

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 33.208% when pulling 545b00aebf46fa9ae48c58f2a26128bfc368807f on apelliciari:master into 22dfed89c22d4d5a2446713c21b78b818365774c on wooey:master.

Chris7 commented 7 years ago

Thanks @apelliciari. I don't have any issues with this, but I am wondering what the circumstances are that require it. Could you elaborate why this is needed for your setup?

apelliciari commented 7 years ago

In my case, for two reasons:

I've done these modifications because my scripts were running correctly in the cli. I know that they aren't really "standalone" scripts, so this can be an edge case