2

How can I add my custom .py file to a quickly project? I'm porting my actual, from scratch project and I have two Python scripts: virtuam and vui.py. I copied vui.py to the virtuam folder and tried this:

from virtuam import vui

but not working. So, where can I copy it? And how do I import it?

Xerz
  • 4,591

2 Answers2

0

If you copy, for example your vui.py script to /quickly/project_name/project_name folder, where is stored python code generated initialy from quickly, for example project_nameWindow.py and others ,then you can import with

import vui

or

from vui import *
0

The solution is simple (but not obvious):

  1. Copy the script into the <project>_lib folder.
  2. Add the script functions in the __init__.py file:

    from . <script> import <function>

  3. Now add the function in the main script:

    from <project>_lib import <function>

    If you want to call the function, just type <function>(<options>)

Thanks to @mhall119 for his question/answer! :P

Xerz
  • 4,591