<div dir="auto">I'm not familiar with using .so files in Python. If I was to import a file called foo.py which contained a class called bar and located in the subfolder lib the import line is:<div dir="auto">from lib.foo import *</div><div dir="auto"><br></div><div dir="auto">Using it in the parent file would be:</div><div dir="auto">myval = lib.foo.bar()</div><div dir="auto"><br></div><div dir="auto">Ivan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 24 Apr 2022, 18:59 Rhys Sage via Swlug, <<a href="mailto:swlug@mailman.lug.org.uk">swlug@mailman.lug.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm not quite sure how to import smbus in Python. Via Thonny I imported the circuitpython version to the Pi Pico. It's sitting in a subdirectory called "lib" in the program folder.<br>
<br>
I've been playing with various different ideas and drawing a blank so far. This is the best I have come up with. <br>
<br>
#import sys<br>
#sys.path.append("lib/")<br>
import lib/<a href="http://smbus.cpython-39-x86_64-linux-gnu.so" rel="noreferrer noreferrer" target="_blank">smbus.cpython-39-x86_64-linux-gnu.so</a><br>
<br>
I'm trying to get the BMP280 pressure/humidity module to work.<br>
<br>
Rhys Sage<br>
<br>
-- <br>
Swlug mailing list<br>
<a href="mailto:Swlug@mailman.lug.org.uk" target="_blank" rel="noreferrer">Swlug@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/swlug" rel="noreferrer noreferrer" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/swlug</a><br>
</blockquote></div>