At 02:19 AM 10/31/2001 -0500, [EMAIL PROTECTED] wrote: >Pretty much all the Webware and 3rd party plug-ins invoke the Python >interpreter by calling "#!/usr/bin/env python" in their scripts. The >trouble with this is that this call brings up Python 1.5.2 in Debian. > >The only ways I can think of to get Python 2 invoked instead is to use the >Debian alternatives system, or else search through all Webware + plug-in >code to change "#!/usr/bin/env python" --> "#!/usr/bin/env python2". > >Neither option seems good. Messing with the Webware code means that I can't >keep current easily. Using the alternatives system to point /usr/bin/python >at python2 will break some Debian packages that depend on 1.5.2, and which >rely on /usr/bin/python to point to Python 1.5.2. > >Indeed, there is quite a raging debate going on now amongst Debian >developers about about how to deal with this kind of problem (and others): >http://groups.google.com/groups?hl=en&th=d8b5f0e26b68ff35&seekm=87itdf28b3.fsf%40marant.org#link1 > >So, if you use Debian, Webware and Python2, how did you manage to keep the >balls in the air at once? > >...Edmund.
I'd like to point out that scripts that are touchy about their Python version should specify it: #!/usr/bin/python1.5 In a sense, you could say they are the source of the problem. It also doesn't help that Debian is so far behind the current version of Python. But most importantly, I wanted to say that there are only 2 places in Webware you should have to worry about this. One is the appserver and the other is any CGI adapter (OneShot.cgi and WebKit.cgi). You have to modify the CGI adapters anyway, so you might as well set them to #!/usr/bin/python2.1 while you're at it. For the AppServer, you can either modify Launch.py one time, which isn't so bad, or you can specify on the command line: > python2.1 Launch.py ThreadedAppServer I suppose if you use MiddleKit Generate.py you will have a similar situation. But that's about it. Regarding keeping current, if you were to have a CVS workspace and you made these mods, I think all your "cvs updates" would go smoothly. I typically have some mods myself, usually in the configuration files. Before anyone gets confused, Webware only requires Python 1.5.2, however some packages like MiddleKit and UserKit require 2.0 and will gracefully exit with a message saying so when the app server launches (under 1.5.2). Of course, since Python 2.x has complete garbage collection and more features, I recommend it. Regarding a global, Debian-solution for this, the #! line should allow specification of minimum version, preferred minimum and maximum. Then Webware would look like this: #!/usr/bin/python min=1.5 prefmin=2.0 max=2.2 I put the max= in there to demonstrate that if we knew python "3.0" didn't work, we could say so. In this example, if you have 1.5 and 2.1, then 2.1 would end up running the script. But if all you had was 1.5 it would still work. If you had 1.4 you would get an error. If this were supported on Debian, then we would tweak the Webware installer to fix up the #! lines appropriately. Of course, I'm sure the committees and nay-sayers will pick at the flaws until this gets rejected and nothing is done. It is extremely difficult to augment or change UNIX traditions. Working around them usually requires less energy so the work-arounds prevail. -Chuck _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss