jehoshua Wrote:But how do I use the class in another scripts, without having to have all the code for the class ?You should look at how packages works.
For example, in PHP, it is simply an "include" statement.
Here a post with some examples that i have made.
So you can make something homemade that work for you like Larz60+ do,if other shall use you package maybe need an other approach.
My goal if make a package is to make
import statement
simple and work on all OS if other shall use my package.As a example look at Requests on simple import
import requests
.Here the most useful module are lifted up them import is simple as this.
>>> import requests >>> >>> requests.get <function get at 0x000002AA430D5B40> >>> requests.post <function post at 0x000002AA430D5CF0> >>> requests.codes <lookup 'status_codes'> >>> requests.status_codes <module 'requests.status_codes' from 'C:\\Python310...'> >>> requests.head <function head at 0x000002AA430D5C60>