#IXsample.py in IX # on 2022BFeb24 by D@CC # my first working import of one of my Thonny packages # Import classes from your brand new package from IX import Raspberry # Create an object of Raspberry class & call its method IX = Raspberry() IX.outModels() isP=1 abcd="a123b" # invoke # resultStr=ModRaspberry.show2("abcd",isP) resultStr=IX.show2("abcd",isP) print(resultStr) # Create an object of Nissan class & call its method #getbuyProgram.py #from Cars.Audi.a8 import get_buy #Now call the function from anywhere: #show2(str1,int2) print("exit IXsample.py") #prerequisites in Thonny Package Library # folder IX # __init__.py # Raspberry.py # Source 1: http://geeksforgeeks.org/create-access-python-package # Title: Create and Access a Python Package # By: Chinmoy Lenka On 15 Feb, 2018 # Source 1 does not work for Thonny packages # Source 2 works for Thonny packages # Source 2: https://www.tutorialspoint.com/create-and-access-a-python-package # ThonnyPackageLibrary: /home/pi/.local/lib/python3.7/site-packages # To view Library a)thonny b)Tools c)Target: user site packages #Documentation: /home/pi/Desktop/PythonPackageCreation.txt #end of IXsample.py