Message11128
I added my draft for this as of https://hg.python.org/jython/rev/a01c366576b8.
Given that there are no targets registered by default (yet), it cannot (?) break anything. Let me give a demonstration:
Jython 2.7.1b3 (default:24ef3218632f+, Feb 24 2017, 15:35:03)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_121
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.name
'java ( ==posix for targets )'
>>> str(os.name)
'java'
>>> os.name == 'posix'
False
>>> os.name.startswith('pos')
False
>>> os.name.gettargets()
[]
>>> os.name.addtarget('org\.python.*')
>>> os.name == 'posix'
True
>>> os.name == 'posixx'
False
>>> os.name.startswith('pos')
True
>>> os.name.startswith('jav')
True
>>> os.name[:3] == 'pos'
True
>>> os.name[:3] == 'jav'
True
>>> os.name[:3]
'jav ( ==pos for targets )'
>>> import sys
>>> sys.platform
'java1.8.0_121 ( ==linux2 for targets )'
>>> sys.platform.startswith('linux')
False
>>> sys.platform.addtarget('org\.python.*')
>>> sys.platform.startswith('linux')
True
>>> sys.platform == 'linux2'
True
>>> 'linux2' == sys.platform
True |
|
Date |
User |
Action |
Args |
2017-02-24 15:15:31 | stefan.richthofer | set | messageid: <1487949331.37.0.518505451378.issue2557@psf.upfronthosting.co.za> |
2017-02-24 15:15:31 | stefan.richthofer | set | recipients:
+ stefan.richthofer, zyasoft, jeff.allen, darjus |
2017-02-24 15:15:31 | stefan.richthofer | link | issue2557 messages |
2017-02-24 15:15:31 | stefan.richthofer | create | |
|