VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Jul 14 2016 - 11:00:47 CDT
Thanks for your efforts. I took a few minutes to read through some
of your diffs, and I gather that in general the approach you took was to
make just the changes necessary to bring the code within range of what the
2to3 converter is capable of automatically regenerating, yes? The VMD
Python interface has been updated somewhat since VMD 1.9.2, but I would think
that in roughly half of cases, your changes will work as-is, and in the
other half it should not be too difficult to adapt your previous diffs
so they are workable with the new VMD code also.
Since the Python C API has changed from 2.x to 3.x, one question I have is
whether we might want to use the 2to3 tool in advance and have the
pre-patched 3.x versions of the code included in the VMD source tree using
some new naming scheme, e.g. instead of "py_filename.C" for Python 2.x source,
we would pre-run the conversion using 2to3 and then checkin the converted
source as "py3_filename.C" and it would then be part of the standard
distribution and people compiling from source would not have to
perform the 2to3 conversion themselves (or expect that it would work
automatically if we incorporated it into the compilation system).
Regarding the issue with Tkinter, I think that this problem can probably
be overcome one way or another. I saw your and other people's previous
discussions on this topic on stackoverflow. It seems likely there's a
solution to this but we can revisit this later on after the major Python3
updates are included in the VMD tree in a useful way.
Let me know what you think.
On Tue, Jul 12, 2016 at 07:03:21PM -0300, Caio S. Souza wrote:
> I've made the necessary changes to allow compiling VMD (1.9.2) with python
> versions 2.7.x and 3.x. I tested it on versions 2.7, 3.3, 3.4 and 3.5, and
> everything is working well. The only drawback is that tkinter is not
> usable under versions 3.x. This is due to the removal of the function
> Tkinter.tkinter.dooneevent which VMD relies on (file PythonTextInterp.C).
> I couldn't find a replacement to this code. So, don't create tkinter UI
> when using version 3+. On version 2 tkinter works as expected.
> To compile, simply place the modified files
> into the "src" folder. To use python 3+, run the 2to3 tool on the files
> inside the "python" folder.
> Caio S. Souza
> LaboratA^3rio de Biologia TeA^3rica e Computacional
> Universidade de BrasAlia
> Visible links
> 1. http://www.lbtc.unb.br/software/downloads/vmd-1.9.2-python3-modifications.zip
> 2. http://www.lbtc.unb.br/
-- NIH Center for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349 http://www.ks.uiuc.edu/Research/vmd/