Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92954

Re: How to check in script if Python or Jython is used

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <fomcl@yahoo.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.072
X-Spam-Evidence '*H*': 0.86; '*S*': 0.01; 'subject:Python': 0.05; 'paths': 0.05; '21,': 0.07; 'subject:How': 0.09; 'creighton': 0.09; 'subject:script': 0.09; 'python': 0.11; '>on': 0.16; 'wrote:': 0.16; 'laura': 0.18; 'to:2**1': 0.22; '2015': 0.23; 'script': 0.25; 'installed': 0.26; 'to:no real name:2**1': 0.27; '+0200,': 0.27; 'cest': 0.29; 'option': 0.31; 'run': 0.32; 'probably': 0.32; 'could': 0.35; 'to:addr:python-list': 0.35; 'execution': 0.35; 'there': 0.36; 'subject:: ': 0.37; 'charset:us- ascii': 0.37; 'skip:- 20': 0.37; 'to:addr:python.org': 0.39; 'determine': 0.61; 'different': 0.64; 'between': 0.65; 'differences': 0.66; 'received:98.137': 0.67; 'received:98.136': 0.70; 'received:gq1.yahoo.com': 0.72; 'received:mail.gq1.yahoo.com': 0.72; 'sunday': 0.72; 'cecil': 0.84; 'received:bullet.mail.gq1.yahoo.com': 0.84; 'subject:check': 0.84; 'taken.': 0.84; 'westerhof': 0.84
X-Yahoo-Newman-Property ymail-3
X-Yahoo-Newman-Id 819042.6876.bm@omp1025.mail.gq1.yahoo.com
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1434887649; bh=0sJCWAJaykXlsBkEFqY5m0L1ec7JrlduhzlAGxLIS00=; h=Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=Jxv4cVvFkN1qos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zOg0KPj4gSSBpbnN0YWxsZWQgSnl0aG9uIGFuZCB3aWxsIHN0YXJ0IHBsYXlpbmcgd2l0aCBpdC4gVGhlcmUBMAEBAQE-
X-Mailer YahooMailWebService/0.8.203.798
Date Sun, 21 Jun 2015 04:54:09 -0700
From Albert-Jan Roskam <fomcl@yahoo.com>
Subject Re: How to check in script if Python or Jython is used
To cecil@decebal.nl, python-list@python.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.676.1434887851.13271.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1434887851 news.xs4all.nl 2837 [2001:888:2000:d::a6]:59799
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92954

Show key headers only | View raw



------------------------ 
Sun, Jun 21, 2015 12:24 PM CEST Cecil Westerhof wrote:

>On Sunday 21 Jun 2015 11:22 CEST, Laura Creighton wrote:
>
>> In a message of Sun, 21 Jun 2015 10:12:06 +0200, Cecil Westerhof
>> writes:
>> I installed Jython and will start playing with it. There probably
>> will be differences between Python and Jython. Is there a way to
>> determine if a script is run by Python or Jython? Then different
>> execution paths could be taken. With sys.version(_info) you do not
>> get this information.
>>

os.path.basename(sys.executable),
if sys.implementation is not an option

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How to check in script if Python or Jython is used Albert-Jan Roskam <fomcl@yahoo.com> - 2015-06-21 04:54 -0700

csiph-web