Launching different interpreters

  • Thread starter Johan Fredrik Ohman
  • Start date
J

Johan Fredrik Ohman

Hi, I'd like to use the newest interpreter if available. I tried a little
bash scripting, but with no success.
Is there some easy way to check a list of possible interpreters and path,
and when found run the script with that program?

Something like this:
#!/usr/bin/python2.3
If not found:
#!/usr/bin/python2.2
 
J

Jp Calderone

Hi, I'd like to use the newest interpreter if available. I tried a little
bash scripting, but with no success.
Is there some easy way to check a list of possible interpreters and path,
and when found run the script with that program?

#!/bin/bash, then write a shell script that searches for versions of
Python, execs the most recent one with your Python source.

Speaking as a use, I'd much rather just be able to specify the Python
version to use at install-time (Perhaps by typing "python<VERSION> setup.py
install").

Jp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top