Python X3D Package x3d.py
Installation | Design Features | Development | Examples | Jupyter Notebook | References | TODO | Contact
The x3d.py Python X3D Package supports programmers with Python interfaces and objects for
standards-based X3D programming, all as open source.
The presentation Python X3D Package Implementation provides an overview and shows examples.
Download and install Python on your system.
x3d.py package installation and update options:
pip install x3d
python -m pip install x3d
That should be all that is needed for most Python X3D programmers! Here is an example screenshot for PythonX3dSmokeTests.py using IDLE.
The current implementation strives to follow first principles of python package design, being as "pythonic" as possible.
X3D Unified Object Model (X3DUOM) defines a full set of object-oriented interfaces for all nodes, fields and statements in the X3D Architecture Specification. The X3DUOM is used to autogenerate the entire x3d.py package, ensuring that it is always up-to-date with the latest X3D Architecture. This codebase tracks with the latest draft specification for X3Dv4 (also supporting X3D versions 3.0 through 3.3).
Python is exceedingly rigorous regarding design and implementation, demands crisp readability, and often leads to a single best approach for each programming task. A single well-constructed open-source Python X3D implementation might serve all Python distributions and programmers well.
Several extensive design efforts previously tried to build a Python language package for X3D with difficulty. The original X3D Python Package Design whiteboard diagram illustrates the many relationships for strict typing and an object-oriented scene graph that are being supported.
Creating a native-Python implementation for X3D data structures appears to provide the greatest possible portability.
Package designers: Don Brutzman, Loren Peitso, John Carlson, Masaki Aono, and Myeong Won Lee.
Most development work is performed using Netbeans and Ant.
pylintstatic testing of the
To run python programs from command line, the
PATH environment variable must point to PYTHONHOME or installation location.
PYTHONPATH environment variable may also need to be set to one of the following:
x3d.pymodule (Windows 10 example):
Now working: testing confirms that deployment is exposing
x3d.py package properly for program execution.
Workaround: if needed for development, simply download x3d.py package source and place it in same directory as your python program.
The Python X3D project is published on the Python Packaging Index (PyPi). Development was configured by following the PyPi packaging-projects tutorial.
ant examples in the
python directory produces results shown in
for the preceding project models.
X3D Resources: Examples
includes over 3900 models converted from
Python source. See
for the entire set of unit-testing results.
Mission statement: "Project Jupyter exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages."
x3d.pycapabilities live in a Web browser.
Python puts a high value on clarity, strict style and effective documentation.
Lots! For starters, in progress:
pylintfor strict code quality. See build.pylint.log.txt for current output results.
XML()export using package
Questions, suggestions, additions and comments about this Python X3D Package page are welcome. Please send them to Don Brutzman and Loren Peitso (email brutzman,lepeitso at nps.edu).
Master version of this Python X3D Package page is available online at
https://www.web3d.org/x3d/stylesheets/python/python.html and available in Sourceforge version control.
Updated: 20 October 2020