473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Launching different interpreters

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
Jul 18 '05 #1
1 1421
On Mon, Oct 13, 2003 at 03:27:46PM +0200, Johan Fredrik Ohman wrote:
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

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Maciej Sobczak | last post by:
Hi, I'm interested in embedding the Python interpreter in a C++ application. What I miss is the possibility to create many different interpreters, so that the stuff that is running in one...
4
by: Paul Miller | last post by:
Some background first - we have some software that embeds a Python interpreter into a host application. Scripts are loaded dynamically and used. But we want to support the ability to edit scripts...
2
by: bmatt | last post by:
I am trying to support multiple interpreter instances within a single main application thread. The reason I would like separate interpreters is because objects in my system can be extended with...
1
by: Craig Ringer | last post by:
Hi folks I'm a bit of a newbie here, though I've tried to appropriately research this issue before posting. I've found a lot of questions, a few answers that don't really answer quite what I'm...
3
by: adsheehan | last post by:
Hi, Does anyone know the reasoning or pros/cons for either (in a multi-threaded C++ app): - creating many sub-interpreters (Py_NewInterpreter) with a thread state each Or
0
by: gabriel.becedillas | last post by:
Hi, At the company I work for we've embedded Python 2.4.1 in a C++ application. We execute multiple scripts concurrenlty, each one in its own interpreter (created using Py_NewInterpreter()). We...
3
by: Marcin Kalicinski | last post by:
How do I use multiple Python interpreters within the same process? I know there's a function Py_NewInterpreter. However, how do I use functions like Py_RunString etc. with it? They don't take any...
14
by: =?ISO-8859-1?Q?S=E9bastien_de_Mapias?= | last post by:
Hello, Hopefully I'm asking my question on the proper forum, but it's some kind of low-level computer language issue and I guess here, many people are likely to give me fine enlightenments (and I...
7
by: skip | last post by:
This question was posed to me today. Given a C/C++ program we can clearly embed a Python interpreter in it. Is it possible to fire up multiple interpreters in multiple threads? For example: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.