|
From: Bruce S. <ba...@an...> - 2001-10-08 18:15:12
|
The idlefork project at sourceforge.net began with the IDLE version created by Dave Scherer in the VPython context. It is now being extended, and bugs being fixed, with the goal of becoming the version of IDLE to be distributed with future versions of Python. The idlefork version has reached a level of maturity that makes it feasible to use it rather than the original VPython version, with the long-term advantage of there being only one version of Scherer-based IDLE to maintain and extend. In the past, the VPython installer installed Doc\VPython.html with a link to Doc\index.html, the standard documentation home page for Python. The original VPython version of IDLE linked to Doc\VPython.html when you pressed F1 for help. The idlefork version links to index.html, and it would be desirable not to change IDLE to accomodate the wider documentation needs of Python+Visual. In the idlefork discussion I proposed overwriting index.html with the VPython index, and installing a copy of the Python index. But a reader pointed out that he makes changes to the Python index (to add more documentation links), and the VPython installer would overwrite the changes. I think I've sorted out how to build the VPython installer so as to preserve user changes to the standard Python Doc\index.html. If you see a hole in my logic, please criticize! I'm using Inno Setup with Extensions to create the installer. 1) In the Doc directory, if Python.html doesn't exist, copy index.html to Python.html. 2) If Python.html still doesn't exist, install a copy from the installation procedure. 3) Install index.html (the base of the VPython documentation, with link to Python.html), overwriting index.html if necessary. 4) Specify in the installer that Doc\index.html and Doc\Python.html are not to be removed by the VPython uninstaller. I've tested this scheme to some extent, but I'm worried that I might have a logical flaw somewhere. It does seem robust to multiple installs and uninstalls of VPython. The only problem I've found with it is that if there is no Doc\index.html, you get an error message, but if you choose "skip" (rather than aborting the installation) both index.html and Python.html are installed correctly. However, if there is no index.html, there are other things wrong anyway, so maybe this isn't terrible (or maybe I can find a way to have the installer not issue a warning in this case). Bruce Sherwood |
|
From: Kevin C. <kj...@gr...> - 2001-10-08 18:45:59
|
Hi, I'm quite new to VPython, and started by running each of the demos to see what they did. (I'm running RedHat 7.1, Python 1.5.2, and the Numerical-13.tar.gz and visual-2001.09.24-3.i386.rpm downloaded from cil.andrew.cmu.edu last week.) Most of the demos work (though a few don't seem to want to let me exit). However a couple give results like this: $ python graphtest.py Visual-2001-09-24 Traceback (innermost last): File "graphtest.py", line 1, in ? from visual.graph import * File "/usr/lib/python1.5/site-packages/visual/graph.py", line 544 gvbars.__init__(self, **args) ^ SyntaxError: invalid syntax $ Known problem? (I searched the mailing-list archive but didn't turn up anything.) |
|
From: Bruce S. <ba...@an...> - 2001-10-08 19:00:41
|
This looks like your copy of visual/graph.py has somehow been damaged; it shouldn't have any syntax errors. On the VPython site, on the download page for any platform, go the the documentation etc. page and get just the visual zip file, from which you can extract a fresh copy of graph.py. Maybe there's a bad copy of graph.py in our Linux distribution files? Bruce Sherwood --On Monday, October 08, 2001 2:34 PM -0400 Kevin Cole <kj...@gr...> wrote: > $ python graphtest.py > Visual-2001-09-24 > Traceback (innermost last): > File "graphtest.py", line 1, in ? > from visual.graph import * > File "/usr/lib/python1.5/site-packages/visual/graph.py", line 544 > gvbars.__init__(self, **args) > ^ > SyntaxError: invalid syntax > $ |
|
From: David S. <dsc...@vy...> - 2001-10-08 19:12:04
|
[Bruce writes] > Maybe there's a bad copy of graph.py in our Linux distribution files? No. The SyntaxError below is caused by the use of the **args syntax, which is not supported by Python 1.5.2. I don't know whether the Linux distribution is supposed to run on 1.5.2 or not. If it is, this line needs to be replaced, e.g. apply( gvbars.__init__, (self,), args) If not, the solution is to upgrade to a more recent version of Python. Dave > > gvbars.__init__(self, **args) > > ^ > > SyntaxError: invalid syntax |
|
From: Ari H. <ahe...@an...> - 2001-10-08 19:15:21
|
On Mon, 8 Oct 2001, David Scherer wrote: > [Bruce writes] > > Maybe there's a bad copy of graph.py in our Linux distribution files? > > No. The SyntaxError below is caused by the use of the **args syntax, > which is not supported by Python 1.5.2. I don't know whether the Linux > distribution is supposed to run on 1.5.2 or not. If it is, this line > needs to be replaced, e.g. > > apply( gvbars.__init__, (self,), args) > > If not, the solution is to upgrade to a more recent version of Python. > > Dave > > > > gvbars.__init__(self, **args) > > > ^ > > > SyntaxError: invalid syntax Man. I seem to keep fixing this in CVS (possibly in multiple places) and it seems to keep creeping back in. We could move to python2 on Linux; it would mean a few modifications to the current packaging tools, but it could be done. Ari |
|
From: David S. <dsc...@vy...> - 2001-10-08 19:09:00
|
The only thing I can see that could be improved in the below procedure is that on uninstall, the original state of affairs should be restored by copying Python.html over index.html (and removing the former). Otherwise uninstalling VPython will leave a Python installation with bad links in the documentation. Dave > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Bruce Sherwood > Sent: Monday, October 08, 2001 2:15 PM > To: vis...@li... > Cc: idle > Subject: [Visualpython-users] Doc files > > > The idlefork project at sourceforge.net began with the IDLE > version created > by Dave Scherer in the VPython context. It is now being > extended, and bugs > being fixed, with the goal of becoming the version of IDLE to be > distributed with future versions of Python. The idlefork version has > reached a level of maturity that makes it feasible to use it > rather than > the original VPython version, with the long-term advantage of > there being > only one version of Scherer-based IDLE to maintain and extend. > > In the past, the VPython installer installed Doc\VPython.html > with a link > to Doc\index.html, the standard documentation home page for > Python. The > original VPython version of IDLE linked to Doc\VPython.html when you > pressed F1 for help. The idlefork version links to > index.html, and it would > be desirable not to change IDLE to accomodate the wider > documentation needs > of Python+Visual. > > In the idlefork discussion I proposed overwriting index.html with the > VPython index, and installing a copy of the Python index. But > a reader > pointed out that he makes changes to the Python index (to add more > documentation links), and the VPython installer would overwrite the > changes. I think I've sorted out how to build the VPython > installer so as > to preserve user changes to the standard Python > Doc\index.html. If you see > a hole in my logic, please criticize! I'm using Inno Setup > with Extensions > to create the installer. > > 1) In the Doc directory, if Python.html doesn't exist, copy > index.html to > Python.html. > > 2) If Python.html still doesn't exist, install a copy from > the installation > procedure. > > 3) Install index.html (the base of the VPython documentation, > with link to > Python.html), overwriting index.html if necessary. > > 4) Specify in the installer that Doc\index.html and > Doc\Python.html are not > to be removed by the VPython uninstaller. > > I've tested this scheme to some extent, but I'm worried that > I might have a > logical flaw somewhere. It does seem robust to multiple installs and > uninstalls of VPython. The only problem I've found with it is > that if there > is no Doc\index.html, you get an error message, but if you > choose "skip" > (rather than aborting the installation) both index.html and > Python.html are > installed correctly. However, if there is no index.html, > there are other > things wrong anyway, so maybe this isn't terrible (or maybe I > can find a > way to have the installer not issue a warning in this case). > > Bruce Sherwood > > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
|
From: Bruce S. <ba...@an...> - 2001-10-08 19:14:27
|
Sharp eyes! You're right, although the Python documentation would still be usable, in the sense that F1 in IDLE would take you to the VPython documentation index, where you would click the Python documentation and get it, while clicking on any of the VPython documentation would give you a broken link. I haven't quite understood the uninstall options in Inno Setup, but I'll try to put things back the way they were if I can. I've released this stuff onto the VPython site, including not showing an error message if there is no index.html (in which case the installer silently installs appropriate Doc files). Bruce Sherwood --On Monday, October 08, 2001 3:08 PM -0400 David Scherer <dsc...@vy...> wrote: > The only thing I can see that could be improved in the below procedure > is that on uninstall, the original state of affairs should be restored > by copying Python.html over index.html (and removing the former). > > Otherwise uninstalling VPython will leave a Python installation with bad > links in the documentation. |