This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Carl.Friedrich.Bolz, arigo, benjamin.peterson, brett.cannon, ncoghlan
Date 2008-10-30.23:03:21
SpamBayes Score 0.00035748674
Marked as misclassified No
Message-id <1225407817.51.0.0331632810102.issue4242@psf.upfronthosting.co.za>
In-reply-to
Content
Interesting, I hadn't noticed that addition to the platform module for 2.6.

A bit more verbose than sys.vm, but it would certainly do the trick :)

In that case, I would suggest something along the lines of the following:

vm = platform.python_implementation().lower()
reference_vm = "cpython"

def impl_detail(*vm_names):
  if vm_names:
    vm_names = [vm.lower() for vm in vm_names]
  else:
    vm_names = [reference_vm]
  if vm in vm_names:
    # Test the implementation detail
  else:
    # Skip this test
History
Date User Action Args
2008-10-30 23:03:37ncoghlansetrecipients: + ncoghlan, brett.cannon, arigo, Carl.Friedrich.Bolz, benjamin.peterson
2008-10-30 23:03:37ncoghlansetmessageid: <1225407817.51.0.0331632810102.issue4242@psf.upfronthosting.co.za>
2008-10-30 23:03:21ncoghlanlinkissue4242 messages
2008-10-30 23:03:21ncoghlancreate