<div dir="ltr">If I get a real urge, I will come up with a good example of a dynamic import if someone else doesn't beat me to it!<div><br></div><div>Good luck!</div><div><br></div><div>John</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jan 27, 2026 at 3:43 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Frankly, the most reliable thing I can think of right now is converting XML to Python, then doing a dynamic import (is there such a thing?), eval of a string the python is read into, or ? My vote is for dynamic import, if anyone wants to look it up. Here it is from Bing:<div><br></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">import importlib</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">module = importlib.import_module(model_file_basename) # load the X3D Python model as a module.</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">Then just test for an attribute/function of the model module with "if hasattr(module, 'newModel'):" and do the right thing, like "module.newModel.XML()" etc.</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">Not tested at all. Use responsibly.</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">So we don't have an XML loader, but we do have a python loader!</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">I'm wondering if Aaron took this approach?</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">Not a security hole if your python or XML comes from trusted sources. Validate and schematron the XML for as much security as X3D can provide. Ultimately, the user has to verify, I think.</font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace;font-size:16px;background-color:rgb(255,255,255)"><font color="#000000">John</font></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 26, 2026 at 6:01 PM Don Brutzman <<a href="mailto:don.brutzman@gmail.com" target="_blank">don.brutzman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Yes "X3DLoaderDOM.java (load DOM into scenegraph)" was difficult to write, requires manual coding and time-consuming to debug. It works and the generator for it is checked into open source as a key part of X3DJSAIL.</div><div><ul><li><a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/X3DLoaderDOM.html" target="_blank">https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/X3DLoaderDOM.html</a></li><li>(on <a href="http://web3d.org" target="_blank">web3d.org</a> but direct access is blocked, library not is version control since it is large and changeable; copy attached)</li></ul><div>The PythonX3dSmokeTests.py program builds a lot of snippets of python scene graph. The same approach might be used to walk any X3D tree and construct a python scene graph. If such code works, and is reliable, we can promote that code and integrate it as part of the x3d.py distribution.</div></div><div><ul><li><a href="https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py" target="_blank">https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py</a></li></ul></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><font face="monospace">all the best, Don</font></div><div style="color:rgb(34,34,34)"><font face="monospace">-- </font></div><div style="color:rgb(34,34,34)"><font face="monospace">X3D Graphics, Maritime Robotics, Distributed Simulation</font></div><div style="color:rgb(34,34,34)"><font face="monospace">Relative Motion Consulting <a href="https://RelativeMotion.info" target="_blank">https://RelativeMotion.info</a></font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 26, 2026 at 2:54 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Thanks for fixing the TODO to add XML!</div><div dir="auto"><br></div><div dir="auto">I have tried to add Python code which loads JSON into an X3DPSAIL scene graph and failed. I have zero confidence in my ability to load stuff into in memory scene graphs, preferring to load things into DOM first. This applies to much of my work, including JSON validation with X3D XML schema.</div><div dir="auto"><br></div><div dir="auto">I am attempting to load JSON into a CGE scene graph, but there’s no real evidence that it works yet. I have a mostly working DOM solution.</div><div dir="auto"><br></div><div dir="auto">I realize X3DLoaderDOM.java (load DOM into scenegraph) is a lot of work, and if this was mostly <span style="font-family:-apple-system,sans-serif">automated, please tell us how if it’s not a national secret. If we have that, then Python might be a lot easier!</span></div><div dir="auto"><span style="font-family:-apple-system,sans-serif"><br></span></div><div dir="auto">My overall plan is to push JSON things into DOM for loading, but Aaron might have a good solution for all encodings!</div><div dir="auto"><br></div><div dir="auto">I am reminded how Xj3D translated XML into a VRML scene graph. Not ideal, but.</div><div dir="auto"><br></div><div dir="auto">My priorities are first CGE, then Blender import. I realize my priorities change a lot. If we had a way to export into Blender from X3DPSAIL, this would make working on X3DPSAIL import much more attractive. Easier said than done.</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, Jan 26, 2026 at 3:51 PM Don Brutzman <<a href="mailto:don.brutzman@gmail.com" target="_blank">don.brutzman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Regarding C/C++/C# open source, no such library has yet been shared. As with our autogenerated Java and Python libraries, these are strong candidates for autogeneration once proper design patterns are written. Once written, library testing using the X3D Example Archives would be essential for success and straightforward to perform.</div><div><br></div><div>Regarding X3D loaders in Python for X3DPSAIL, none has been written yet. Please be aware that .x3d files are written in valid XML. Refreshed TODO list:</div><div><ul><li>Python X3D Package x3d.py, X3D Python Scene Access Interface Library (X3DPSAIL)</li><li>The x3d.py Python X3D Package supports programmers with Python interfaces and objects for standards-based X3D programming, all as open source.</li><li><a href="https://www.web3d.org/x3d/stylesheets/python/python.html#TODO" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html#TODO</a></li></ul></div><blockquote style="margin:0px 0px 0px 40px;border:medium;padding:0px"><div><h3 style="color:rgb(0,0,0);font-family:"Times New Roman""><a href="https://www.web3d.org/x3d/stylesheets/python/python.html#TODO" target="_blank">🔖</a> <a id="m_-4913611010843514323m_4774994377860890800m_6978576582027966023m_9161778956745694983m_-455216243894507153m_-219190271867682683gmail-TODO">TODO</a></h3></div><div><h3 style="color:rgb(0,0,0);font-family:"Times New Roman""><a href="https://www.web3d.org/x3d/stylesheets/python/python.html#" target="_blank"><img width="50" height="32" title="to top" alt="to top" style="border: 0px; float: right;"></a></h3></div><div><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Lots! Much progress continues. For a release-summary log, please see <a href="https://sourceforge.net/p/x3d/code/32962/log/?path=/www.web3d.org/x3d/stylesheets/python/python.html" target="_blank">history log for this page</a>.</p></div></blockquote><div><ul style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><ul><li><i>TODO:</i> clean up <a href="https://www.web3d.org/x3d/stylesheets/python/x3d.html" target="_blank">x3d.html</a> documentation autogenerated by <a href="https://docs.python.org/3/library/pydoc.html" target="_blank">pydoc</a>.</li><li><i>TODO:</i> We need a "Getting Started" tutorial on this page. This is a good opportunity... who wants to help?!</li><li><i>TODO:</i> <span style="background-color:rgb(255,242,204)">utility support for loaders from XML (.x3d or .xml), ClassicVRML (.x3dv), VRML97 (.wrl), and JSON (.json or .x3dj) files.</span></li><li><i>TODO:</i> distribution support for <a href="https://jupyter.org/" target="_blank">Jupyter Notebook</a> (initial example works), <a href="https://zeppelin.apache.org/" target="_blank">Apache Zeppelin</a> notebook, <a href="https://www.anaconda.com/" target="_blank">Anaconda</a> distribution of Python, and other data-science platforms.</li></ul></ul><div><font color="#000000" face="Times New Roman" size="3">To facilitate library review, I was recently able to autogenerate Python documentation for x3d.py using the pydoc tool.</font></div></div><div><ul><li><font color="#000000" face="Times New Roman" size="3"><a href="https://www.web3d.org/x3d/stylesheets/python/x3d.html" target="_blank">https://www.web3d.org/x3d/stylesheets/python/x3d.html</a></font></li></ul><div>Please note that each X3D node has the following methods listed.</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Methods defined here:<br></span><a name="m_-4913611010843514323_m_4774994377860890800_m_6978576582027966023_m_9161778956745694983_TransformSensor-HTML5"><strong>HTML5</strong></a>(self, indentLevel=0)<br><span>Provide HTML5 output serialization using modified XML encoding with no singleton self-closing elements.<br></span><a name="m_-4913611010843514323_m_4774994377860890800_m_6978576582027966023_m_9161778956745694983_TransformSensor-JSON"><strong>JSON</strong></a>(self, indentLevel=0, syntax='JSON')<br><span>Provide <a href="https://www.web3d.org/x3d/stylesheets/python/x3d.html#X3D" target="_blank">X3D</a> output serialization using JSON encoding (usable for .json file suffix).<br></span><a name="m_-4913611010843514323_m_4774994377860890800_m_6978576582027966023_m_9161778956745694983_TransformSensor-VRML"><strong>VRML</strong></a>(self, indentLevel=0, VRML97=False)<br><span>Provide <a href="https://www.web3d.org/x3d/stylesheets/python/x3d.html#X3D" target="_blank">X3D</a> output serialization using VRML encoding (usable for .x3dv or .wrl file suffix).<br></span><a name="m_-4913611010843514323_m_4774994377860890800_m_6978576582027966023_m_9161778956745694983_TransformSensor-XML"><strong>XML</strong></a>(self, indentLevel=0, syntax='XML')<br><span>Provide Canonical <a href="https://www.web3d.org/x3d/stylesheets/python/x3d.html#X3D" target="_blank">X3D</a> output serialization using XML encoding (usable for .x3d file suffix).</span></blockquote><div><br></div><div>Am thinking the HTML5 method is no longer needed, this was written when X3DOM had trouble with self-closing elements.</div><div><br></div><div>Thanks for all efforts that might improve x3d.py.</div></div><div dir="ltr"><div><br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><font face="monospace">all the best, Don</font></div><div style="color:rgb(34,34,34)"><font face="monospace">-- </font></div><div style="color:rgb(34,34,34)"><font face="monospace">X3D Graphics, Maritime Robotics, Distributed Simulation</font></div><div style="color:rgb(34,34,34)"><font face="monospace">Relative Motion Consulting <a href="https://RelativeMotion.info" target="_blank">https://RelativeMotion.info</a></font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 25, 2026 at 4:18 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="auto">I guess I didn't send this earlier.</div><div dir="auto"><br></div><div dir="auto">I did see the standards progress page. For C/C++/C#, are any libraries open source? I’m thinking COIN 3D, OpenInventor, H3D. Maybe others. I see there’s an ISO documentation for each language, but apparently the standard isn’t open source???? I’m looking for opportunities for X3DJSONLD serialization. OpenInventor (COIN 3D) looks super complex.</div><div dir="auto"><br></div><div dir="auto">For X3DPSAIL, can you point me at an example of loading XML or DOM into a scenegraph? Maybe I missed something???? I’m looking for something like CreateX3DFromString()??? I realized I can create Python from XML, just like my tools can go from JSON to DOM to Python; but my toolchain isn’t Python. Running stylesheets in Python would be a great example.</div><div dir="auto"><br></div><div dir="auto">Looking here:</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit"><a href="https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py" style="font-size:inherit" target="_blank">https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py</a></div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 25, 2026 at 12:19 AM Don Brutzman <<a href="mailto:don.brutzman@gmail.com" target="_blank">don.brutzman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Standards planning status appears on the following page.</div><div><ul><li><a href="https://www.web3d.org/x3d/progress" target="_blank">X3D Standards Progress | Web3D Consortium</a></li><li><a href="https://www.web3d.org/x3d/progress" target="_blank">https://www.web3d.org/x3d/progress</a></li></ul><div>Scroll past overview prose to find links to each version completed, in progress and planned.</div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><font face="monospace"><br></font></div><div style="color:rgb(34,34,34)"><font face="monospace">all the best, Don</font></div><div style="color:rgb(34,34,34)"><font face="monospace">-- </font></div><div style="color:rgb(34,34,34)"><font face="monospace">X3D Graphics, Maritime Robotics, Distributed Simulation</font></div><div style="color:rgb(34,34,34)"><font face="monospace">Relative Motion Consulting <a href="https://RelativeMotion.info" target="_blank">https://RelativeMotion.info</a></font></div></div></div></div><br></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 23, 2026 at 7:44 PM John Carlson via X3D-Ecosystem <<a href="mailto:x3d-ecosystem@web3d.org" target="_blank">x3d-ecosystem@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">A quick search reveals this page:</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit"><a href="https://wiki.web3d.org/wiki/index.php/X3D_Python_Language_Binding" style="font-size:inherit" target="_blank">https://wiki.web3d.org/wiki/index.php/X3D_Python_Language_Binding</a></div><br></div><div dir="auto"><br></div><div dir="auto">This link on the page is dead?</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit"><a href="https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019777" style="font-size:inherit" target="_blank">https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019777</a></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><div style="font-size:inherit" dir="auto"><br style="font-size:inherit"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">Btw: both 19776-4 and 19776-5 are titled JSON encoding?????</span></div>==================================</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">I could start writing a Python binding standard? Except we have three versions, one based on GraalPy/X3DJSAIL and one based on “normal” python-X3DPSAIL, and if course H3D, which AFAIK, has C++ underneath? I believe CGE may also have plans for Python.</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">GraalPy examples are here:</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><div style="font-size:inherit"><a href="https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/graalpy/net/coderextreme" style="font-size:inherit" target="_blank">https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/graalpy/net/coderextreme</a></div><br></div><div style="font-size:inherit" dir="auto">Python examples are on the X3D archives, some duplicated here:</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><div style="font-size:inherit"><a href="https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/python/net/x3djsonld/data" style="font-size:inherit" target="_blank">https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/python/net/x3djsonld/data</a></div><br></div><div style="font-size:inherit" dir="auto">It seems like the pure python implementation (pythonic) has more sway and implementations, so I am willing to capitulate, even though, in my experience, X3DJSAIL generates better JSON! It was never really my idea to go with a pure python version though, but I don’t know how to install GraalPy in Blender! I will pay anyone $100 if they can make blender run GraalPy for import/export addons on Windows! I’m guessing X3DPSAIL can run stylesheets as well? Perhaps it’s time to convert stylesheets to pure Java, with a stylesheet of course!</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">As far as support, GraalPy is supported by Oracle, and Python is supported by Microsoft (Does Guido still work there?).</span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline"><div dir="auto" style="font-size:inherit"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">It would be very nice to have a renderer for X3DJSAIL and X3DPSAIL (see previous post)!</span></div><div dir="auto" style="font-size:inherit"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline"><br></span></div><div dir="auto" style="font-size:inherit">Has anyone used Xj3D from GraalPy?</div></span></div><br></div><div style="font-size:inherit" dir="auto">==================================</div></div><div dir="auto"><br></div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 23, 2026 at 8:52 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Apologies, I just noticed I meant X3D python binding.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 23, 2026 at 8:50 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">What’s the status of the Python encoding standard? Would my participation help?</div><div dir="auto"><br></div><div dir="auto">Instead of spending time on Blender currently, my thought is to go back to developing an “X3D” JSON to CGE scenegraph converter, as that can be developed beyond DOM loading. Does anyone know a good Pascal LLM? I do find begin/end rather tedious.</div><div dir="auto"><br></div><div dir="auto">If there’s a lot of demand for a Blender HAnim export currently, I will reconsider. Or X3D to glTF conversion.</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:-apple-system,sans-serif">John </span><br></div>
</blockquote></div></div>
</blockquote></div></div>
-- <br>
X3D-Ecosystem mailing list<br>
<a href="mailto:X3D-Ecosystem@web3d.org" target="_blank">X3D-Ecosystem@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org</a><br>
</blockquote></div>
</blockquote></div></div>
</div>
</div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>