[Scons-users] Importing Module That is a Build Product

Bill Deegan bill at baddogconsulting.com
Fri Sep 16 12:41:47 EDT 2016


Maybe this SO question applies?
http://stackoverflow.com/questions/10524607/easy-to-edit-configuration-file-for-a-matlab-function

On Fri, Sep 16, 2016 at 6:33 AM, Keith F Prussing <kprussing74 at gmail.com>
wrote:

> On 2016-09-15, Bill Deegan wrote:
>
>> Can you explain what this module's function is?
>> Any reason you must generate file and then run it?
>>
>
> In my case, the module simply defines constants.  The only reason I'm
> trying to generate the file of constants is because I need to use the same
> constants in a collection of MATLAB scripts that are also part of the
> build.  I want to use the same values in both the MATLAB generated figures
> as well as some documentation and resource file generation, and I find it
> "easier" to generate the Python syntax from the MATLAB than going the other
> way.  Honestly, I just arbitrarily chose that direction because Python
> doesn't care about the semicolon, but MATLAB gets noisy if I need some of
> the constants in an interactive session.  An alternative in my case would
> be to generate the MATLAB syntax from the Python.  That may actually be the
> safer route in the long run.  I was mainly surprised when SCons didn't find
> the generated module in the current directory when that is what I expected.
>
> Could you eval the logic (I know it's not recommended, but it's effectively
>> what's being done here anyway)
>>
>
> I could but I have a strong aversion to eval except in tightly controlled
> conditions. ;-) I'd prefer to be explicit about where my constants are.
>
> Keith
>
> --
> Keith F Prussing
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160916/1832c228/attachment-0001.html>


More information about the Scons-users mailing list