[x3d-public] X3D Python package design considerations - let Python be Python

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu Jul 4 17:46:44 PDT 2019


Loren and I had an excellent clean-slate session exploring X3D Python package design considerations.  His long experience in teaching and programming Python was tremendously useful.  This follows up on the excellent session we had together with Jakub Flotyński two weeks ago during his research visit to NPS.  (Three hours each time, real "deep dives" here.)

We ignored all programming language idioms associated with Java JavaScript C and focused solely on essentials of Python class/package design.

Diagram attached (blue is X3D, red is Python).  Looks ready for attempting initial implementation via X3DUOM.  John, no doubt during subsequent inspection of initial code versions we will find several relevant patterns in your X3DPSAIL efforts that can be applied, not to mention many patterns in multiple Python books.

As before, it continues to look like X3DPSAIL and a pure-python approach can be compatible - but let's wait and see how far a strict Pythonic focus can take us.

Useful references:

[1] Python documentation
     https://docs.python.org

[2] Python Cookbook by David Beazley and Brian K. Jones, O'Reilly and Associates, 2013.
     https://www.dabeaz.com/cookbook.html

[3] Learning Python by Mark Lutz, 5th edition, O'Reilly and Associates, 2013.
     https://learning-python.com/about-lp5e.html

[4] Programming Python by Mark Lutz, 4th edition, O'Reilly and Associates, 2011.
     https://learning-python.com/about-pp4e.html


On 7/3/2019 7:38 AM, Don Brutzman wrote:
> Looks like you are pretty close!  Suggested tweaks if possible:
> [...]
> - can we change "import x3dpsail" to "import x3dpsail as x3d" and then change all the element prefixes from "x3dpsail." to "x3d."
> 
> this would make the source more consistent.  when we implement a native-Python class library, we can call that x3d and retain x3dpsail as is.
> 
> good luck John!

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: X3dPythonPackageDesign2019July3.pdf
Type: application/pdf
Size: 128328 bytes
Desc: X3dPythonPackageDesign2019July3.pdf
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190705/a84dd68d/attachment-0001.pdf>


More information about the x3d-public mailing list