From: Stef M. <s.m...@ru...> - 2009-02-24 19:06:41
|
hi Roberto, sometime ago I wrote the message below, works like a charm under windows. cheers, Stef I played around, and found the following work around: - I installed Vpython version 5 on a different computer (afraid of harming my own work-PC ;-) - called the visual directory "visual5" - copied that visual5 directory to site-packages - created the function below, which I place on a central place where all programs can reach it - and add a line to all VPython programs "Get_Visual ( ... )" before importing visual, seems to work great. cheers, Stef def Get_Visual ( Version = 3 ) : import os, sys print sys.path for path in sys.path : if path.endswith ( 'site-packages') : print path break vpath = os.path.join ( path, 'visual' ) if ( Version == 3 ) and os.path.exists ( vpath + '3' ) : print 'Visual ==> V3', vpath os.rename ( vpath, vpath + '5' ) os.rename ( vpath + '3', vpath ) elif ( Version == 5 ) and os.path.exists ( vpath + '5' ) : print 'Visual ==> V5', vpath os.rename ( vpath, vpath + '3' ) os.rename ( vpath + '5', vpath ) Get_Visual ( 3 ) from visual import * ... Roberto Aguirre Maturana wrote: > I have found some compatibility problems between vpython 3 and 5 (it seems > that pixel shading is not universal enugh). Therefore, I don't think I > will be able to make the transition to version 5 any time soon. > > Is there a way to have version 3 and version 5 co-existing on the same > computer, so I can call them independently? > > I guess, maybe a solution could be to create an independent visual library > based on vpython 3. The calling for the library could be something like > "from visual3 import ..." In that way it could be easy to have both > versions of visual installed, and if I require the older version I just > have to replace the string "visual" by "visual3" on my applications. > > I may even have a program that simultaneously open visual 3 and visual 5 > scenes, for benchmarking purposes. > > > Any thoughts? > > > Best regards, > Roberto Aguirre Maturana > Santiago, Chile > > |