<div dir="ltr">What one could to do minimize porting would be to create one's own method, say log() and the call print() or print, I guess based on a test for python3 or not. I don't know the details of print. I do have a way for testing for python 3 or not, if that is desirable.<div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 14, 2020 at 7:39 PM 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">In total agreement, Vince. Sorry I did not state that sooner.  In 2.7 ()'s are left off the print statement.<div><br></div><div>I do not know how easy it would be to restrict the number of print's so porting would be a minimal exercise.</div><div><br></div><div>Python 2.7 is beyond the support window.</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 14, 2020 at 5:34 PM <a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a> <<a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.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>The refence John Carlson identified suggests using a 'processing instruction' as the first line of the x3d.py file, the line would be:<div># -*- coding: utf-8 -*-</div><div>and this allows the Python 2 interpreter to read the source file assuming UTF-8 encoding; for the current download of x3d.py (as of 12 June 2020) this works, Python 2 accepts the non-ascii character (in this case, the non-ascii character is the "MULTIPLICATION_SIGN" , unicode 215, used in a documentation comment.)</div><div><br></div><div>However, elsewhere in the x3d.py, the print({text}) form of the Python print statement is used, and that is only permitted in Python 3.</div><div><br></div><div>As it is written now, x3d.py is only supported by Python 3. I think this is a reasonable choice.</div><div><br></div><div>Vince Marchetti</div><div><br><div><br><blockquote type="cite"><div>On Jun 12, 2020, at 12:31 AM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><a href="https://www.python.org/dev/peps/pep-0263/" target="_blank">https://www.python.org/dev/peps/pep-0263/</a>   (declaring an encoding)<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 11, 2020 at 2:20 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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"><span style="font-family:monospace"><span>$ python
</span><br>Python 2.7.16 (default, Oct 10 2019, 22:02:15)  <br>[GCC 8.3.0] on linux2
<br>Type "help", "copyright", "credits" or "license" for more information.
<br>>>> import x3d.x3d as x
<br>Traceback (most recent call last):
<br>  File "<stdin>", line 1, in <module>
<br>  File "/home/andreas/.local/lib/python2.7/site-packages/x3d/x3d.py", line 206
<br>SyntaxError: Non-ASCII character '\xc3' in file /home/andreas/.local/lib/python2.7/site-packages/x3d/x3d.py on line 206, but no encoding declared; see <a href="http://python.org/de" target="_blank">http://python.org/de</a><br>v/peps/pep-0263/ for details<br>
<br></span><span style="font-family:monospace"><span>$ cat -nA  /home/andreas/.local/lib/python2.7/site-packages/x3d/x3d.py | grep 206 | head -1
</span><br>   206      'SFMatrix3d', # Single Field (singleton) 3M-CM-^W3 matrix of double-precision floating point numbers$<br></span><div><br></div><div>There are indeed non-ascii characters.</div><div><br></div><div>python3 does not complain.</div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>
_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br></div></blockquote></div><br></div></div></blockquote></div>
</blockquote></div>