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


Groups > comp.lang.python > #92954 > unrolled thread

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

Started byAlbert-Jan Roskam <fomcl@yahoo.com>
First post2015-06-21 04:54 -0700
Last post2015-06-21 04:54 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

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

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

FromAlbert-Jan Roskam <fomcl@yahoo.com>
Date2015-06-21 04:54 -0700
SubjectRe: How to check in script if Python or Jython is used
Message-ID<mailman.676.1434887851.13271.python-list@python.org>

------------------------ 
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web