Re: using python 2.5



kunal.k wrote:
I have installed python 2.5 for a particular code. Now i have 2.6
already installed. How do i direct this code to use the 2.5 modules??

I can think of two different questions you might be asking. 1) How do I get the add-on modules installed with 2.6 to also work in 2.5? or 2) How do I get a particular script to use 2.5, while all other scripts should use 2.6 ?

Sean answered #1, but I think you meant to ask #2

First question is what OS you've installed these on. In Windows, the python version is selected by file associations, while in Unix/Linux systems, it's selected by the shebang line at the beginning of the script.

A generic answer if you just have one script is to make an OS script (bat file, or shell script) that invokes the particular python interpreter, passing it the script name as an argument).

But if you want to be able to just run the script as though it were a compiled executable, tell us what OS you're on, and maybe the base locations of your two installations.

DaveA

.



Relevant Pages

  • Re: Remove programs with a script?
    ... My purpose is to use the script below to pass "uninst_notes.bat" to a remote ... And hence will do an uninstall when calling GUID and uninstall switch ... I would need to remove old Lotus Notes installations from 40 PC's. ...
    (microsoft.public.scripting.wsh)
  • Report Server and IIS 7.0
    ... I have two installations of SQL that have appered to go well. ... installed by Data Protection Manager on IIS 7.0. ... Script access is denied when you try to access an ASP, ... In IIS Manager, open the Sites folder, and then open the folder of the Web ...
    (microsoft.public.sqlserver.setup)
  • Re: Automating Drive Formatting
    ... > I'm looking for some way to script together an automatic formatting of a hard ... the third line of the output from fdisk. ... installations). ...
    (freebsd-questions)
  • getting path- local or remotely
    ... installations into more of a common script. ... For example, my apporach at the ... beginnig was writing a script to install some application ... I mainly had the same installation script for the program but the path woul ...
    (microsoft.public.scripting.vbscript)
  • Re: Deployment comparision
    ... We are currently using ris/scripted installations for our mainstream ... We also got 300+ simple servers used as installation servers, ... Cons with scripting, it takes time and you may have to do some manuall ... > or script based install, ...
    (microsoft.public.windows.server.setup)

Loading