English 中文(简体)
是否容易把一个易碎的服务器作为可执行的工具?
原标题:Is there an easy way to distribute a Flask server as an executable?

我建造一些有背书的简单编辑,我希望能够把这些编辑作为供用户使用的工具,以多数客户方的方式传播其编辑内容(即,我不想让用户不得不用像我的SQL或阿帕奇那样的 st子来打小农场)。

因此,我想象着这样一种情况:

  1. User downloads a .zip file
  2. In the resulting opened folder, the user clicks index.html
  3. That opens in a browser
  4. Backbone app starts, stores data in localStorage
  5. The user can then export to CSV.

相信它不会解决我的问题: 我愿帮助用户用浏览器收集电离辐射数据,然后以熟悉的形式将其退回(例如,可以装上Excel)。

我不想强迫他们配置一台服务器。 看来,在超文本5中几乎有可能做到这一点。 然而,在至少一个浏览器(Chrome)中,这只字不动,因为我有这样的错误:

XMLHttpRequest cannot load file:///users/me/project/data/Appdata.json. Origin null is not allowed by Access-Control-Allow-Origin.

(如果足够的话,我就没有在Grein和.js上找到这一错误。 档案装货罚款。

因此,在我看来,在这些用户使用某种当地服务器为后台服务方面没有任何办法。

因此,我试图说明如何建设一种可分配的、跨平台的可执行性,使我的用户能够开办一个弗拉斯克服务器。 (我希望能建设一个支持后台的REST。)

这种想法是否可取? 假定我可以让有关人员安放沙里。

这是否可行? 似乎有许多办法包罗沙方案(Pyinstaller)? py2exe? ...... 因此,我认为,如果有人可能知道我所想的 st子的解决办法,我会在这里问。

TIA!

问题回答

不太容易。 视窗上,你必须包括沙尔。 麦克风和欧林地通常安装了沙捞越层,但你可以肯定什么版本,因此常常会更容易地把你的具体堡垒束缚起来。 然后,你必须把你想要掌握的所有附属设施纳入你的一揽子计划,或能够安装管道,容易安装。

您可使用py2app。 由于你仍需要为每个目标顾问办公室提供不同版本,因此赢得双向。 使它跨平台的唯一途径是打破所有版本,并且有某些跨平台的编码执行平台的适当版本。

如果你们需要像MySQL或甚至Kings这样的数据库,就会变得更加复杂,因为你不得不将这些数据库包括在内。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...