[x3d-public] Progress on Python API all examples compile andrun(but do nothing)

John Carlson yottzumm at gmail.com
Mon Mar 11 16:17:32 PDT 2019


In C++ parlance, template methods are member function templates, I think.   At least that is the terminology I am looking for that matches neither java or python, but is a design pattern.

John

Sent from Mail for Windows 10

From: John Carlson
Sent: Monday, March 11, 2019 6:12 PM
To: Brutzman, Donald (Don) (CIV)
Cc: X3D Graphics public mailing list
Subject: RE: [x3d-public] Progress on Python API all examples compile andrun(but do nothing)


>All three look interesting and similar.

>AFAICT these might all be compatible variations on Python syntax, if we get the API bindings correct.  Then the "which style?" question becomes a matter of programmer preference, fitting the task at hand.

Yep, but I don’t think they are pythonic yet.  HelloWorld.kwargs.py follows the vpython style, I think.

>Seems like a worthy goal to pursue, either making it work compatibly or else figuring out just what the limitations & tradeoffs might be.

I am not sure, but I think that @property may make it incompatible with X3DJSAIL, and we will need a layer on top to make this API compatible with pyjnius API (similar to jsail and sai packages in X3DJSAIL).  It’s probably a non-issue a this point, just need to see what the @property API looks like for an API.

Please become knowledgeable about *my* template methods (please examine def setter and def getter methods in packagemanager.py) before meeting.  We need to decide if we want to generate the API at compile/run time (using the language’s built in features) or build time (using a build script), currently template methods are a build script feature, but probably can be simplified by using a language feature (or likely, a combination).  Thanks!

John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190311/86439a6f/attachment.html>


More information about the x3d-public mailing list