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

John Carlson yottzumm at gmail.com
Thu Jul 4 20:12:17 PDT 2019


I picked up python syntax doing the django CRUD example in 2012.  Probably the website is buried in other examples at this point.

If someone wants to help Michael C. and me create a simple Flask wtforms example, I could use some encouragement.  We’re trying to do text summarization and bias interface to the web in python. It’s quite simple, submit URL from web form, send URL to a summarization site, compute bias, and send summary and bias back to web page.

Just a small project to come up to speed on Flask, etc.

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/63504363/attachment.html>


More information about the x3d-public mailing list