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

2015-06-22 Thread Dan Stromberg
IMO, it's usually better to test for features and use them if they are present, than to build a list of features available in specific interpreters. I see it as analogous to the difference between huge C #ifdef's on OS, and autoconf. On Sun, Jun 21, 2015 at 1:12 AM, Cecil Westerhof wrote: > I in

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

2015-06-21 Thread Thomas 'PointedEars' Lahn
Cecil Westerhof wrote: > 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

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

2015-06-21 Thread Albert-Jan Roskam via Python-list
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

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

2015-06-21 Thread Cecil Westerhof
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

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

2015-06-21 Thread Laura Creighton
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 t