Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93016
| References | <87r3p5pjjd.fsf@Equus.decebal.nl> |
|---|---|
| Date | 2015-06-22 12:39 -0700 |
| Subject | Re: How to check in script if Python or Jython is used |
| From | Dan Stromberg <drsalists@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.711.1435001958.13271.python-list@python.org> (permalink) |
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 <Cecil@decebal.nl> 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 this > information. > > -- > Cecil Westerhof > Senior Software Engineer > LinkedIn: http://www.linkedin.com/in/cecilwesterhof > -- > https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
How to check in script if Python or Jython is used Cecil Westerhof <Cecil@decebal.nl> - 2015-06-21 10:12 +0200
Re: How to check in script if Python or Jython is used Laura Creighton <lac@openend.se> - 2015-06-21 11:22 +0200
Re: How to check in script if Python or Jython is used Cecil Westerhof <Cecil@decebal.nl> - 2015-06-21 12:24 +0200
Re: How to check in script if Python or Jython is used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-21 18:12 +0200
Re: How to check in script if Python or Jython is used Dan Stromberg <drsalists@gmail.com> - 2015-06-22 12:39 -0700
csiph-web