[x3d-public] X3D Python package design considerations - let Python be Python
John Carlson
yottzumm at gmail.com
Thu Jul 4 19:56:40 PDT 2019
Oh, I forgot column.
😊
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Thursday, July 4, 2019 9:45 PM
To: Brutzman, Donald (Don) (CIV); X3D Graphics public mailing list; Peitso, Loren (CIV)
Cc: Jakub Flotyński; aono at tut.jp
Subject: RE: X3D Python package design considerations - let Python be Python
Package rename from x3dpsail to x3d checked in. x3dpsail.py left unchanged. Please test. Thanks!
I find https://stackoverflow.com/ very useful for learning python, plus https://www.google.com/. Of course you have to know what to search for, but a 25 year career is pretty good for that.
Is it a slot, or an attribute or a field or a property or a key/value or a member?
I hear eskimos have 300 words for snow. Well, https://www.princeton.edu/~browning/snow.html
John
Sent from Mail for Windows 10
From: Brutzman, Donald (Don) (CIV)
Sent: Thursday, July 4, 2019 7:46 PM
To: John Carlson; X3D Graphics public mailing list; Peitso, Loren (CIV)
Cc: Jakub Flotyński
Subject: Re: X3D Python package design considerations - let Python be Python
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 --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190704/a672679e/attachment-0001.html>
More information about the x3d-public
mailing list