Python 3 and Code Generator

3 posts / 0 new
Last post
solarjoe
Python 3 and Code Generator

Hello Paul,

I gave the new code generator a try (to Python 3) and found that
some functions do not seem to be exposed yet.

ssc.data_set_matrix_from_csv()
ssc.build_info()

SAM 2016.3.14 r4
sam-sdk-2016-3-14-r3

The r4 of the sdk is not available on the homepage.

Kind regards,
Joe

Paul Gilman

Dear Joe,

Thank you for your feedback on the code generator and the Python wrapper. We will look into those functions.

We did not release an r4 version of the wrapper because the r4 update in SAM was to the user interface and did not affect SSC. SDK version 2016.3.14 r3 and SAM Version 2016.3.14 r4 are concurrent versions.

Best regards,
Paul.

solarjoe

Hello Paul,

I modified the SDK Python wrapper to work with Python 2 and 3.

A decorator is used to have clean code and to handle functions with arbitrary parameters (instead of adding .decode() and .encode() everywhere).

You can find it here:

https://gist.github.com/solarjoe/fc9a6391c1b8201750b923b04995bceb

I saw that the two functions mentioned above

ssc.data_set_matrix_from_csv()
ssc.build_info()

area available in the file PySSC.py created by the code generator,
but not in sscapi.py that comes with sam-sdk-2016-3-14-r3.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer