1# This is too much for a grepper answer, so here is a link to the tutorial:
2# https://towardsdatascience.com/how-to-build-your-first-python-package-6a00b02635c9
1# So first, create a file structure following
2# this template:
3"""
4package_name
5|-- __init__.py
6|-- sayHello.py
7"""
8# This will be a dummy package
9# (Some python code to automatically create this dummy file structure)
10import os
11os.mkdir("package_name")
12open("package_name/__init__.py", "w")
13open("package_name/sayHello.py", "w")
14# Now we have our file structure
15# Im gonna explain what the shit this means
16"""
17 1. __init__.py
18The __init__.py file is the file that will be run when importing the package,
19normally people write in it the imports to import the rest
20 2. sayHello.py
21Will be imported from __init__.py and will contain an init function,
22which will, obviously, print "Hello, World!"
23"""
24# So now we write the following content in the following files:
25###### __init__.py
26from sayHello import init
27# you also can add a bunch of shit
28__author__ = "YourName"
29__version__ = (0)
30# etc..
31###### sayHello
32def init():
33 print("Hello, World!")
34# Now we're done!
35# you can make a new file named test.py
36"""
37The file structure becomes this:
38test.py
39package_name
40|-- __init__.py
41|-- sayHello.py
42"""
43# And write this in test.py
44###### test.py
45import package_name
46
47package_name.init()
48# If your python version is not from the dark web
49# it should work
50# kthxbye