【发布时间】:2017-07-07 16:13:56
【问题描述】:
我编写了一个 python 应用程序,它可以提取一些 excel 文件,进行一些数据分析,然后将结果写入一个创建绘图的 excel 文件中。
目前选项是通过 argparse 使用输入参数设置的。我想知道是否有一种好的、低开销的方法可以使它成为一个 Web 应用程序。
通过 jupyter.org 发布的 jupyter notebook 是个好主意吗?
我需要用 django 做点什么吗?
目前我的 argparse 代码如下所示。我正在使用 Gooey 来处理我的 GUI。
def get_args():
"""Get CLI arguments and options"""
parser = GooeyParser(description='AngioTool File Analyzer - Version ' + __version__,
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('Path',
help="Path to the AngioTool output files (.xls).",
widget='DirChooser')
parser.add_argument('--Norm_Interval',
help='Name of the interval to which all the other intervals will be normalized.'
'\r\"auto\" tries to find the smallest interval and normalizes to that',
default='auto')
parser.add_argument('--Control_Device',
help='Name of the control device to which all devices should be ratioed',
default='D1')
parser.add_argument('--Ratio_to_Control_Device', dest='Ratio_to_Control_Device',
widget='CheckBox',
help='Check to ratio to the control device',
action='store_true', default='False')
parser.add_argument('--Plot_Measurements',
help="List of measurements to plot",
default=('Total Vessels Length', 'Total Number of End Points', 'Total Number of Junctions'))
parser.add_argument('--Chart_Titles', help='List of titles to be placed on plot',
default=('Total Vessels Length', 'Total Number of End Points', 'Total Number of Junctions'))
args = parser.parse_args()
return args
我需要从本地路径读取文件,允许用户通过某种 Web UI 设置选项,并在新的 excel 文件中返回结果。
任何想法将不胜感激。
【问题讨论】:
-
Jupyter 可能没问题,但对它不熟悉,但如果它适合您的要求,请试一试。它似乎有一个专门的焦点,可能适合你。无论如何 - 对于 StackOverflow 问题,我们努力做到不偏不倚,所以更一般的问题,比如“什么是好工具”,不是这里回答的问题,而是更具体的问题,比如关于 Jupyter 问题的具体问题等
标签: python django jupyter-notebook jupyter