How to create a module[qpython3]

358 views Asked by At

Noob alert!

I'm wondering how you go about importing a module(one made in qpython)? I've tried making a new folder and adding a setup.py then trying to import but just get error about module not found(or something)..

Thanks in advance

1

There are 1 answers

0
Андрей Коровин On BEST ANSWER

Your folder must to consist in Path variable. You must append path to your folder in this variable. Add the following lines to the top of your project main file:

import sys
sys.path.append(yourPath)

yourPath must be a string type. For example:

'/storage/sdcard0/myfolder'