Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Nothing ever becomes real until it is experienced. -- John Keats


devel / comp.lang.python / Re: How to find any documentation for smbus?

SubjectAuthor
* How to find any documentation for smbus?Chris Green
+- Re: How to find any documentation for smbus?Chris Green
+* Re: How to find any documentation for smbus?km
|`- Re: How to find any documentation for smbus?Chris Green
`- Re: How to find any documentation for smbus?Dieter Maurer

1
How to find any documentation for smbus?

<08ov0k-kpc23.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24263&group=comp.lang.python#24263

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: How to find any documentation for smbus?
Date: Sat, 28 Oct 2023 17:08:00 +0100
Lines: 40
Message-ID: <08ov0k-kpc23.ln1@esprimo.zbmc.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net u+Vjq+Yq6L5zgEdLdVBLFwJYEot69sQ2sy3H0uJYVPph/jolQ=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:I1lvJFfw/FYCAiuZEpA8ciV3q8w= sha256:w3UE43YOo74g9pqUcvVDk3F/3bMMDR82lpv+CH6SOp8=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-86-generic (x86_64))
 by: Chris Green - Sat, 28 Oct 2023 16:08 UTC

I am using the python3 smbus module, but it's hard work because of the
lack of documentation. Web searches confirm that the documentation is
somewhat thin!

If you do the obvious this is what you get:-

>>> import smbus
>>> dir (smbus)
['SMBus', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
>>> help(smbus)

Help on module SMBus:

NAME
SMBus

DESCRIPTION
This module defines an object type that allows SMBus transactions
on hosts running the Linux kernel. The host kernel must have I2C
support, I2C device interface support, and a bus adapter driver.
All of these can be either built-in to the kernel, or loaded from
modules.

Because the I2C device interface is opened R/W, users of this
module usually must have root permissions.

FILE
/usr/lib/python3/dist-packages/smbus.cpython-39-arm-linux-gnueabihf.so

Even a list of available methods would be handy! :-)

Presumably python3's smbus is just a wrapper so if I could find the underlying C/C++
documentation it might help.

--
Chris Green
·

Re: How to find any documentation for smbus?

<boqv0k-1pk23.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24264&group=comp.lang.python#24264

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Re: How to find any documentation for smbus?
Date: Sat, 28 Oct 2023 17:50:51 +0100
Lines: 19
Message-ID: <boqv0k-1pk23.ln1@esprimo.zbmc.eu>
References: <08ov0k-kpc23.ln1@esprimo.zbmc.eu> <slrnujqdps.2u2.dan@djph.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Nr42sfaB0brVvQdAVMOMsAiuXRQjLI8mjn6cTt13Z00LFFu/c=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:4Lf/+PDYQu8xCZ7ovHNY8TtBRhg= sha256:0FWNURPNqRZNqg9Gf7iniqp5oDRmuMlSgo+XQe8kL2U=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-86-generic (x86_64))
 by: Chris Green - Sat, 28 Oct 2023 16:50 UTC

Dan Purgert <dan@djph.net> wrote:
> On 2023-10-28, Chris Green wrote:
> > I am using the python3 smbus module, but it's hard work because of the
> > lack of documentation. Web searches confirm that the documentation is
> > somewhat thin!
> >
>
> The SMBus spec is available from http://smbus.org (or at least it used
> to be ... watch it be hidden behind a paywall now).
>
That provides very detailed hardware information but virtually nothing
at all about software libraries and such. Lots of interesting
reading, for example there's an appendix detailing the differences
between smbus and i2c, but nothing very helpful for a poor old
application programmer like me! :-)

--
Chris Green
·

Re: How to find any documentation for smbus?

<uhjqca$3ftuh$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24265&group=comp.lang.python#24265

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kammam...@libero.it (km)
Newsgroups: comp.lang.python
Subject: Re: How to find any documentation for smbus?
Date: Sat, 28 Oct 2023 20:19:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <uhjqca$3ftuh$1@dont-email.me>
References: <08ov0k-kpc23.ln1@esprimo.zbmc.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 28 Oct 2023 20:19:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5d41862dc434984cddd79ffaba3a1cd1";
logging-data="3667921"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QpP8+ifB+bX8QuiEaDo60+CpeUn/ub8k="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:PIU13i/tojqy+yaKdKf1CxK6eFc=
 by: km - Sat, 28 Oct 2023 20:19 UTC

Il Sat, 28 Oct 2023 17:08:00 +0100, Chris Green ha scritto:

> I am using the python3 smbus module, but it's hard work because of the
> lack of documentation. Web searches confirm that the documentation is
> somewhat thin!
>
> If you do the obvious this is what you get:-
>
> >>> import smbus dir (smbus)
> ['SMBus', '__doc__', '__file__', '__loader__', '__name__',
> '__package__', '__spec__']
> >>> help(smbus)
>
>
> Help on module SMBus:
>
> NAME
> SMBus
>
> DESCRIPTION
> This module defines an object type that allows SMBus
> transactions on hosts running the Linux kernel. The host kernel
> must have I2C support, I2C device interface support, and a bus
> adapter driver.
> All of these can be either built-in to the kernel, or loaded
> from modules.
>
> Because the I2C device interface is opened R/W, users of this
> module usually must have root permissions.
>
> FILE
> /usr/lib/python3/dist-packages/smbus.cpython-39-arm-linux-
gnueabihf.so
>
>
> Even a list of available methods would be handy! :-)
>
>
> Presumably python3's smbus is just a wrapper so if I could find the
> underlying C/C++
> documentation it might help.

https://pypi.org/project/smbus2/

smbus2 is designed to be a "drop-in replacement of smbus". SO you can look
at its documentation for or use it instead of smbus.

Disclaimer: I haven't any experience on this library

Re: How to find any documentation for smbus?

<ba421k-4vna3.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24267&group=comp.lang.python#24267

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Re: How to find any documentation for smbus?
Date: Sun, 29 Oct 2023 13:46:19 +0000
Lines: 58
Message-ID: <ba421k-4vna3.ln1@esprimo.zbmc.eu>
References: <08ov0k-kpc23.ln1@esprimo.zbmc.eu> <uhjqca$3ftuh$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net bZ9ct6buLUuKHiBxI7MoyQxRo8VBX7/56t/+pTYjT5mx/zuZc=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:H0FDMahLIcoOFmtRkj+KjmPZ/NE= sha256:rVyMft6iIcsGIoBAQQrgexx/iVa73BQYEBT59u5JCH0=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-86-generic (x86_64))
 by: Chris Green - Sun, 29 Oct 2023 13:46 UTC

km <kammamuri@libero.it> wrote:
> Il Sat, 28 Oct 2023 17:08:00 +0100, Chris Green ha scritto:
>
> > I am using the python3 smbus module, but it's hard work because of the
> > lack of documentation. Web searches confirm that the documentation is
> > somewhat thin!
> >
> > If you do the obvious this is what you get:-
> >
> > >>> import smbus dir (smbus)
> > ['SMBus', '__doc__', '__file__', '__loader__', '__name__',
> > '__package__', '__spec__']
> > >>> help(smbus)
> >
> >
> > Help on module SMBus:
> >
> > NAME
> > SMBus
> >
> > DESCRIPTION
> > This module defines an object type that allows SMBus
> > transactions on hosts running the Linux kernel. The host kernel
> > must have I2C support, I2C device interface support, and a bus
> > adapter driver.
> > All of these can be either built-in to the kernel, or loaded
> > from modules.
> >
> > Because the I2C device interface is opened R/W, users of this
> > module usually must have root permissions.
> >
> > FILE
> > /usr/lib/python3/dist-packages/smbus.cpython-39-arm-linux-
> gnueabihf.so
> >
> >
> > Even a list of available methods would be handy! :-)
> >
> >
> > Presumably python3's smbus is just a wrapper so if I could find the
> > underlying C/C++
> > documentation it might help.
>
> https://pypi.org/project/smbus2/
>
> smbus2 is designed to be a "drop-in replacement of smbus". SO you can look
> at its documentation for or use it instead of smbus.
>
> Disclaimer: I haven't any experience on this library

Ah, thank you, I had come across smbus2 but wanted to stay with smbus
if I could as it's in the Debian repositories. However, as you say,
it claims to be a "drop-in replacement of smbus" so the documentation
should be some help at least.

--
Chris Green
·

Re: How to find any documentation for smbus?

<mailman.100.1698684943.3828.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24270&group=comp.lang.python#24270

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!rocksolid2!news.neodome.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: die...@handshake.de (Dieter Maurer)
Newsgroups: comp.lang.python
Subject: Re: How to find any documentation for smbus?
Date: Mon, 30 Oct 2023 17:55:33 +0100
Lines: 16
Message-ID: <mailman.100.1698684943.3828.python-list@python.org>
References: <08ov0k-kpc23.ln1@esprimo.zbmc.eu>
<25919.57349.716380.748196@ixdm.fritz.box>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de yTEfsqkUyQ0b70g9kyubxQ3b96WPZ+sfyDriMXYjbDdw==
Cancel-Lock: sha1:VVEGfUkCFG6hcM/vBkaKEkp1VdE= sha256:i9SZmnHG3Bvss1T0e5CpRRg1ouOJaWW06mJYbeslZq0=
Return-Path: <dieter@handshake.de>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.134
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.75; '*S*': 0.02; 'cc:addr:python-list':
0.09; 'skip:` 10': 0.09; 'cc:no real name:2**0': 0.14; 'import':
0.15; 'python3': 0.16; 'cc:addr:python.org': 0.20; 'subject:How':
0.23; 'received:de': 0.23; 'cc:2**0': 0.25; '>>>': 0.28; 'chris':
0.28; 'but': 0.32; 'subject:for': 0.33; 'header:In-Reply-To:1':
0.34; 'subject:skip:d 10': 0.35; "skip:' 10": 0.37; 'main': 0.37;
'using': 0.37; "it's": 0.37; 'class': 0.37; 'hard': 0.37; 'wrote':
0.39; 'tell': 0.60; 'providing': 0.63; 'header:Received:6': 0.67;
'obvious': 0.69; 'received:88': 0.84; 'you?': 0.88; 'green': 0.96
In-Reply-To: <08ov0k-kpc23.ln1@esprimo.zbmc.eu>
X-Mailer: VM 8.0.12-devo-585 under 21.4 (patch 24) "Standard C" XEmacs Lucid
(x86_64-linux-gnu)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <25919.57349.716380.748196@ixdm.fritz.box>
X-Mailman-Original-References: <08ov0k-kpc23.ln1@esprimo.zbmc.eu>
 by: Dieter Maurer - Mon, 30 Oct 2023 16:55 UTC

Chris Green wrote at 2023-10-28 17:08 +0100:
>I am using the python3 smbus module, but it's hard work because of the
>lack of documentation. Web searches confirm that the documentation is
>somewhat thin!
>
>If you do the obvious this is what you get:-
>
> >>> import smbus
> >>> dir (smbus)
> ['SMBus', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
> >>> help(smbus)
> ...

What does `help(smbus.SMBus`) tell you?

Almost surely, `SMBus` is a class providing the main access methods.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor