Answer the question
In order to leave comments, you need to log in
Is there any way to merge multiple files?
Hello, I have a question. I have many py files in which codes for different functions are written, and I want to create one main file that will somehow combine them and run the bot through it, and they will work as if it were all in one file
Answer the question
In order to leave comments, you need to log in
Create a main file in the same folder (for example main.py) and import all the files you need in it import lvl.py for example. This way you can use content from other files, but only variables, classes and functions. For example, if the imported file has a func() function, you can call it as lvl.func()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question