[OpenWrt-Devel] Question regarding call python script

Bastian Bittorf bittorf at bluebottle.com
Sun Mar 13 06:41:25 EDT 2016


* Karl Palsson <karlp at tweak.net.au> [13.03.2016 10:00]:
> > array_set "test" 7
> > array_get 7
> > 
> > or for 2-dimensional arrays:
> > array_set "2dim" 3 14
> > array_get 3 14
> 
> You know, this is _exactly_ why people want to use python or even
> perl instead of bash/awk/sed.
> 
> This is a great, wonderful solution if you _must_ use posix
> shell. But do we?

Yes, we do.
In terms of "this does not look nice and elegant" you are right:

Using n-dimensional arrays in build scripts is
a rare usecase. you can easily switch to AWK if this
fits more. But using Perl or Python should be avoided,
because it adds more complexity to the dependencies
and leads to more headache when maintaining:

Perl and Python are not well defined and all sorts
of things are breaking. (if not tomorrow, then next week...)

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list