Message11127

Author stefan.richthofer
Recipients darjus, jeff.allen, stefan.richthofer, zyasoft
Date 2017-02-24.15:14:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487949269.48.0.404724173029.issue2557@psf.upfronthosting.co.za>
In-reply-to
Content
I added my draft for this as of
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
History
Date User Action Args
2017-02-24 15:14:57stefan.richthoferunlinkissue2557 messages
2017-02-24 15:14:29stefan.richthofersetmessageid: <1487949269.48.0.404724173029.issue2557@psf.upfronthosting.co.za>
2017-02-24 15:14:29stefan.richthofersetrecipients: + stefan.richthofer, zyasoft, jeff.allen, darjus
2017-02-24 15:14:29stefan.richthoferlinkissue2557 messages
2017-02-24 15:14:29stefan.richthofercreate