Python 3 and Code Generator

  • solarjoe
  • Topic Author
More
17 Jan 2017 12:07 #5086 by solarjoe
Python 3 and Code Generator was created by solarjoe
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

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
17 Jan 2017 17:37 #5087 by Paul Gilman
Replied by Paul Gilman on topic Python 3 and Code Generator
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.

Please Log in or Create an account to join the conversation.

  • solarjoe
  • Topic Author
More
18 Jan 2017 14:40 #5088 by solarjoe
Replied by solarjoe on topic Python 3 and Code Generator
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:

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.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum