Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform : a boolean to know easily when a system is posix #54175

Closed
fgallaire mannequin opened this issue Sep 28, 2010 · 3 comments
Closed

platform : a boolean to know easily when a system is posix #54175

fgallaire mannequin opened this issue Sep 28, 2010 · 3 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@fgallaire
Copy link
Mannequin

fgallaire mannequin commented Sep 28, 2010

BPO 9966
Nosy @briancurtin, @fgallaire
Files
  • platform_isposix_boolean.py: Patch for the platform module (new boolean isposix).
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-09-28.00:47:05.507>
    created_at = <Date 2010-09-28.00:34:43.191>
    labels = ['type-feature', 'library']
    title = 'platform : a boolean to know easily when a system is posix'
    updated_at = <Date 2010-09-28.00:47:05.500>
    user = 'https://github.com/fgallaire'

    bugs.python.org fields:

    activity = <Date 2010-09-28.00:47:05.500>
    actor = 'brian.curtin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-28.00:47:05.507>
    closer = 'brian.curtin'
    components = ['Library (Lib)']
    creation = <Date 2010-09-28.00:34:43.191>
    creator = 'fgallaire'
    dependencies = []
    files = ['19039']
    hgrepos = []
    issue_num = 9966
    keywords = []
    message_count = 3.0
    messages = ['117495', '117497', '117499']
    nosy_count = 3.0
    nosy_names = ['exarkun', 'brian.curtin', 'fgallaire']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue9966'
    versions = ['Python 3.3']

    @fgallaire
    Copy link
    Mannequin Author

    fgallaire mannequin commented Sep 28, 2010

    Hi,

    The platform module could provide a boolean to know easily if a system is posix or not.

    The expected result, when the system is posix :

    >>> import platform
    >>> platform.isposix
    True

    otherwise :

    >>> import platform
    >>> platform.isposix
    False

    Here is a patch to do so. It also provides an update for the platform
    documentation and a test case.

    Best regards

    Florent Gallaire

    @fgallaire fgallaire mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Sep 28, 2010
    @exarkun
    Copy link
    Mannequin

    exarkun mannequin commented Sep 28, 2010

    It could, but why introduce this redundancy with os.name?

    @briancurtin
    Copy link
    Member

    I second what Jean-Paul said. os.name is well established and I don't think a second way to get the same information is needed.

    Thanks for the suggestion and patch, Florent.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant