Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Dash被精心部署为android或IOS的apk_Python_Plotly Dash_Beeware - Fatal编程技术网

Python Dash被精心部署为android或IOS的apk

Python Dash被精心部署为android或IOS的apk,python,plotly-dash,beeware,Python,Plotly Dash,Beeware,有没有办法为android或IOS创建dash plotly应用程序?我已经阅读了一些文档,但我仍然不知道如何使用仪表板并将其包含到app.py默认文件中: import toga from toga.style import Pack from toga.style.pack import COLUMN, ROW class Matics(toga.App): def startup(self): """ Constr

有没有办法为android或IOS创建dash plotly应用程序?我已经阅读了一些文档,但我仍然不知道如何使用仪表板并将其包含到app.py默认文件中:

import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW


class Matics(toga.App):

    def startup(self):
        """
        Construct and show the Toga application.

        Usually, you would add your application to a main content box.
        We then create a main window (with a name matching the app), and
        show the main window.
        """
        main_box = toga.Box()

        self.main_window = toga.MainWindow(title=self.formal_name)
        self.main_window.content = main_box
        self.main_window.show()


def main():
    return Matics()

他们提供的示例是一个Hello world应用程序,其代码如下:


class HelloWorld(toga.App):
    def startup(self):
        main_box = toga.Box(style=Pack(direction=COLUMN))

        name_label = toga.Label(
            'Your name: ',
            style=Pack(padding=(0, 5))
        )
        self.name_input = toga.TextInput(style=Pack(flex=1))

        name_box = toga.Box(style=Pack(direction=ROW, padding=5))
        name_box.add(name_label)
        name_box.add(self.name_input)

        button = toga.Button(
            'Say Hello!',
            on_press=self.say_hello,
            style=Pack(padding=5)
        )

        main_box.add(name_box)
        main_box.add(button)

        self.main_window = toga.MainWindow(title=self.formal_name)
        self.main_window.content = main_box
        self.main_window.show()

    def say_hello(self, widget):
        print("Hello", self.name_input.value)

我还没有找到在主框中包含破折号绘图代码的方法


我的目标是将仪表板作为android的APK,因此如果beeware不是解决方案,我很乐意看到解决方案是什么。

要将公文包代码部署到APK中,请首先在项目目录中打开命令提示符,然后在命令窗口中键入:

briefcase create android
然后在完成所有工作后,键入:

briefcase build android
然后这将需要几分钟,然后你的apk将被创建,要创建一个iOS应用程序,你需要Mac PC和命令是一样的,但你必须用iOS取代android。。 谢谢