How To Run A File From Another Python File
a.py from kivy.app import App from kivy.uix.dropdown import DropDown from kivy.lang import Builder class CustDrop(DropDown): def __init__(self, **kwargs): super(CustD
Solution 1:
The solution is as follow:
Snippet
a.py
...
kv_str = Builder.load_string('''
#:import os os
...
CustDrop:
id: dropdown
Button:
text: 'Run another script'
size_hint_y: None
height: '48dp'
on_release: os.system("python3 b.py")
Output
Solution 2:
instead of calling to system, there is a python module to do that
Post a Comment for "How To Run A File From Another Python File"