[x3d-public] Python, the emperor has no clothes!
John Carlson
yottzumm at gmail.com
Mon Apr 20 08:27:47 PDT 2020
You have both a x3d.py and x3d folder. I don't think that's allowed, or
you need to put more symbols in __init__.py, perhaps?
On Mon, Apr 20, 2020 at 10:23 AM John Carlson <yottzumm at gmail.com> wrote:
> On the x3d.py page @ web3d:
>
> *Workaround*: if needed for development, simply download x3d.py
> <https://www.web3d.org/x3d/stylesheets/python/x3d.py> package source and
> place it in same directory as your python program.
>
> That works too!
>
> On Mon, Apr 20, 2020 at 10:21 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> Okay!
>> from x3d import *
>> does not work
>>
>> import x3d
>> works.
>>
>> puzzling.
>>
>> John
>>
>> On Mon, Apr 20, 2020 at 10:14 AM John Carlson <yottzumm at gmail.com> wrote:
>>
>>> I give up. I can't get a simple import to work! I have python 3.8.2
>>> (latest).
>>>
>>> Hmm.
>>>
>>> On Mon, Apr 20, 2020 at 9:32 AM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> coderextreme at DESKTOP-DOPK2VD MINGW64 /c/x3d-code/
>>>> www.web3d.org/x3d/stylesheets/python/examples
>>>> $ ls
>>>> BackgroundCollection.py HelloWorld.py HelloWorldPrefixed.py
>>>> README.md
>>>> BackgroundCollection.x3d HelloWorld.x3d PythonX3dSmokeTests.py
>>>>
>>>> coderextreme at DESKTOP-DOPK2VD MINGW64 /c/x3d-code/
>>>> www.web3d.org/x3d/stylesheets/python/examples
>>>> $ python HelloWorld.py
>>>> Traceback (most recent call last):
>>>> File "HelloWorld.py", line 21, in <module>
>>>> from x3d import *
>>>> AttributeError: module 'x3d' has no attribute 'SFBool'
>>>>
>>>> coderextreme at DESKTOP-DOPK2VD MINGW64 /c/x3d-code/
>>>> www.web3d.org/x3d/stylesheets/python/examples
>>>> $ python BackgroundCollection.py
>>>> Traceback (most recent call last):
>>>> File "BackgroundCollection.py", line 21, in <module>
>>>> from x3d import *
>>>> AttributeError: module 'x3d' has no attribute 'SFBool'
>>>>
>>>> coderextreme at DESKTOP-DOPK2VD MINGW64 /c/x3d-code/
>>>> www.web3d.org/x3d/stylesheets/python/examples
>>>> $ python HelloWorldPrefixed.py
>>>> Traceback (most recent call last):
>>>> File "HelloWorldPrefixed.py", line 26, in <module>
>>>> newModel=x3d.X3D(profile='Immersive',version='3.3',
>>>> AttributeError: module 'x3d' has no attribute 'X3D'
>>>>
>>>> coderextreme at DESKTOP-DOPK2VD MINGW64 /c/x3d-code/
>>>> www.web3d.org/x3d/stylesheets/python/examples
>>>> $ python PythonX3dSmokeTests.py
>>>> ===================
>>>> Importing local development copy of X3D package:
>>>> from x3d import *
>>>> Traceback (most recent call last):
>>>> File "PythonX3dSmokeTests.py", line 23, in <module>
>>>> from x3d import *
>>>> AttributeError: module 'x3d' has no attribute 'SFBool'
>>>>
>>>> Umm. It's a race to see who gets toXML first!
>>>>
>>>> John
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200420/65465ed9/attachment-0001.html>
More information about the x3d-public
mailing list