The problem that code solves is finding the name of the invoked command and
getting rid of the Windows .exe extension. I'd write it a bit differently:
from os.path import basename, splitext
...
progname = splitext(basename(sys.argv[0]))[0]
(or, at length)
progfile =
All I can say is:
SHORTPROGN = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
> From: Georg Mischler
> Subject: Re: [Radiance-dev] Python scripts for Radiance
> Date: March 21, 2016 4:22:47 PM PDT
>
> You're arguing with some of the most syntactitcally
You're arguing with some of the most syntactitcally complex aspects
of current programming languages here. (STL?!?)
In contrast, Pythons syntax was specifically designed to be easy to
understand and use (there's a lot of research into that).
Maybe you should just invest an hour and play through
Dear Georg,
I would vote for the glaze csh script.
Best,
Wouter
On 03/21/2016 05:02 PM, Georg Mischler
wrote:
Hi again!
I have converted some of the original Radiance shell scripts into
Python.
Hi again!
I have converted some of the original Radiance shell scripts into
Python.
https://github.com/gmischler/PyRad
The examples so far are exact drop-in replacements of the original csh
or Perl versions, but with some extra functionality and benefits.
* usage instructions (-H)
*