Skip to content

API supports both Python 2.7 and Python 3.2 #38

Description

@npryce
No description provided.

Activity

  1. dhuntley1023 commented on May 9, 2014

    @dhuntley1023

    Is there something technically preventing operation of the API in Python 2.7 (i.e. certain Python features only avail in P3), or is this just a developer preference?

    FWIW, I also think it'd be useful to remove the Python 3 dependency, and if it's just a case of needing a bit of work I might take it on and send you a pull... but I'd rather know ahead of time if the pull would be rejected on philosophical grounds.

    (Nice lib by the way, was only way to get my Honeywell I2C Pressure Sensor working. SMbus didn't fill the bill)

  2. npryce commented on May 9, 2014

    @npryce
    ContributorAuthor

    Hi. I'm glad you found it useful.

    We chose Python 3 because we were building our products at education and
    for people who were learning programming for the first time. Python 3
    removes a lot of historical cruft and wierdness from Python 2. E.g. Python
    2 has two kinds of class system ("old" and "new" style classes) and some
    things silently stop working if you accidentally write an old style class
    by forgetting to make your class extend object. Python 3 has a single
    class system. Also, Python 3 makes a clear distinction between buffers of
    bytes and strings of (unicode) text, which makes writing I/O code that
    interfaces with hardware less error prone.

    But, the Quick2Wire libraries are no longer under active development by the
    original team, so feel free to fork the library and make it do what you
    want.

    All the best,
    --Nat

    On 9 May 2014 07:33, David Huntley notifications@github.com wrote:

    Is there something technically preventing operation of the API in Python
    2.7 (i.e. certain Python features only avail in P3), or is this just a
    developer preference?

    FWIW, I also think it'd be useful to remove the Python 3 dependency, and
    if it's just a case of needing a bit of work I might take it on and send
    you a pull... but I'd rather know ahead of time if the pull would be
    rejected on philosophical grounds.

    (Nice lib by the way, was only way to get my Honeywell I2C Pressure Sensor
    working. SMbus didn't fill the bill)

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/38#issuecomment-42637481
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions