Python3 will be supported?

#1

I am new here ,i want to know the question “PYTHON3 WILL BE SUPPORTED?”, as i see the C is supported,if it’s possible to support python3??

0 Likes

#2

I don’t think (?) SketchUp’s C SDK is based on a technology comparable to GObject that can automatically generate bindings for any language.

Apart from that, the Ruby API is for manipulating the model and the application at runtime of SketchUp, whereas the C SDK is focussed on reading/writing .skp files in external applications (not at runtime of SketchUp). The C SDK does not let you do all the same things as the API. If you are looking for an alternative to learning SketchUp’s Ruby API, the C SDK is not that alternative.

However some things can be done with the C SDK.

  • If you want Python bindings for the C SDK, you would have to write them on your own, for every method.
  • Or you use the existing project pyslapi (see also the examples for generating scene thumbnails etc.)
    Note that such Python bindings do not support all the platforms that Python supports, only those that SketchUp supports.
  • Something interesting could be RubyPython which allows to access a Python interpreter from within a Ruby interpreter and mix data, function calls and classes/libraries from both. If it can be used within SketchUp’s threading limitation (I have not tested), you would still have to write a Ruby wrapper that calls your python code.
1 Like