Search code examples
pythongtkgnome-builder

Import from other files in GTK


I'm creating a new project on gnome-builder. The trouble is I have a list in file vaccine.py and now I want to import it into my window.py file but when I run the program it shows "ModuleNotFoundError: No module named 'vaccine'". I try to create a test python file and import that list and no error occurs. Can someone show me what I do wrong?

1


Solution

  • I think you have to add your new file to the meson.build file. As you develop in a flatpak environment your file will not be automatically packaged into this environment. In order to do that this template uses a meson buildsystem. A note: GNOME Builder always installs applications as this resolves missing icons/settings etc.