Я довольно тщательно искал в Google, но не нашел ответа на этот вопрос. Когда я пытаюсь выполнить сборку с помощью py2app, я получаю следующую ошибку:
Может ли это быть вызвано использованием в коде такого модуля, как «gspread»? Или потому, что я использую wxpython? Беспокоит то, что «python setup.py py2app -A» работает без проблем.
running py2app
creating /Users/Bailejor/Desktop/build/bdist.macosx-10.5-x86_64/python2.7-standalone/app
creating /Users/Bailejor/Desktop/build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/collect
creating /Users/Bailejor/Desktop/build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/temp
creating build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/lib-dynload
creating build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/Frameworks
*** using recipe: virtualenv ***
*** using recipe: ftplib ***
*** using recipe: lxml ***
*** using recipe: PIL ***
*** using recipe: xml ***
*** using recipe: sip ***
*** using recipe: matplotlib ***
*** using recipe: pydoc ***
*** using recipe: docutils ***
*** using recipe: scipy ***
Traceback (most recent call last):
File "setup.py", line 18, in
setup_requires=['py2app'],
File "//anaconda/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "//anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 659, in run
self._run()
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 865, in _run
self.run_normal()
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 943, in run_normal
self.process_recipes(mf, filters, flatpackages, loader_files)
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 833, in process_recipes
find_needed_modules(mf, packages=rval['packages'])
File "//anaconda/lib/python2.7/site-packages/modulegraph/find_modules.py", line 289, in find_needed_modules
m = mf.import_hook(package, None, ["*"])
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 927, in import_hook
for s in self._ensure_fromlist(m, fromlist):
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1053, in _ensure_fromlist
submod = self._import_module(sub, fullname, m)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1260, in _scan_ast
visitor.visit(co)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 249, in generic_visit
self.visit(item)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 615, in visit_ImportFrom
self._process_import(node.module or '', _ast_names(node.names), level)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1029, in _load_tail
result = self._import_module(head, mname, result)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1105, in _import_module
m = self._load_module(fqname, fp, pathname, stuff)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1178, in _load_module
self._scan_code(co, m)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1251, in _scan_code
self._scan_ast(co, m)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1260, in _scan_ast
visitor.visit(co)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 249, in generic_visit
self.visit(item)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 251, in generic_visit
self.visit(value)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 245, in generic_visit
for field, value in iter_fields(node):
RuntimeError: maximum recursion depth exceeded
Вот мой предложенный код (спасибо за предложение):
import wx
import wx.grid as gridlib
import numpy as np
import pandas as pd
import csv
import matplotlib.pyplot as plt
import os
import itertools
from itertools import chain
import getpass
import gspread
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.figure import Figure
import sys
####################################################################################################
class TopPanel(wx.Panel):
""""""
#Top PANEL
#----------------------------------------------------------------------
def __init__(self, parent):
"""Constructor"""
wx.Panel.__init__(self, parent=parent)
grid = gridlib.Grid(self)
grid.CreateGrid(25,12)
grid.SetColLabelValue(0, "Index")
self.buttonPlus = wx.Button(self, wx.NewId(), "+", size=(50, 28))
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(grid, 0, wx.EXPAND)
self.SetSizer(sizer)
########################################################################################################
class BottomPanel(wx.Panel):
""""""
#Bottom PANEL
#----------------------------------------------------------------------
def __init__(self, parent):
"""Constructor"""
wx.Panel.__init__(self, parent=parent)
#Sizers------------------------------------------------------------
self.sizer = wx.BoxSizer(wx.HORIZONTAL)
self.sizer2=wx.BoxSizer(wx.VERTICAL)
self.sizer3=wx.BoxSizer(wx.VERTICAL)
self.sizer4=wx.BoxSizer(wx.VERTICAL)
#-----------------------------------------------------------------
self.figure = Figure(figsize=(1,2))
self.axe = self.figure.add_subplot(111)
self.figurecanvas = FigureCanvas(self, -1, self.figure)
self.barseries = wx.TextCtrl(self, size=(140, -1))
self.lblname = wx.StaticText(self, label="Enter Series to Bar:")
self.buttonUpdate = wx.Button(self, label="Update Figure")
self.buttonPlot = wx.Button(self, wx.NewId(), "Plot", size=(60,28))
self.buttonClear = wx.Button(self, wx.NewId(), "Clear", size=(60,28))
self.buttonSave=wx.Button(self, wx.NewId(), "Save", size=(60, 28))
self.buttonNext=wx.Button(self, wx.NewId(), "Next", size=(60, 28))
self.buttonPrev=wx.Button(self, wx.NewId(), "Last", size=(60, 28))
self.buttonGplot=wx.Button(self, wx.NewId(), "Gplot", size=(60, 28))
sampleList = ['Yes', 'No']
self.rb = wx.RadioBox(self, wx.ID_ANY, "Secondary Vertical Axis", wx.DefaultPosition, wx.DefaultSize, sampleList, 2, wx.RA_SPECIFY_COLS)
#Button Binders------------------------------------------------------
self.buttonSave.Bind(wx.EVT_BUTTON, self.saveFig)
self.buttonPlot.Bind(wx.EVT_BUTTON, self.plotFig)
self.buttonClear.Bind(wx.EVT_BUTTON, self.clearFig)
self.buttonGplot.Bind(wx.EVT_BUTTON, self.googlefunc)
self.buttonNext.Bind(wx.EVT_BUTTON, self.nextButtonFunc)
self.buttonPrev.Bind(wx.EVT_BUTTON, self.prevButtonFunc)
#--------------------------------------------------------------------
#Add to Sizers-------------------------------------------------------
self.sizer.Add(self.figurecanvas, proportion=2, border=1, flag=wx.ALL | wx.EXPAND)
self.sizer2.Add(self.rb, proportion=0, border=2, flag=wx.ALL)
self.sizer2.Add(self.lblname, proportion=0, border=2, flag=wx.ALL)
self.sizer2.Add(self.barseries, proportion=0, border=2, flag=wx.ALL)
self.sizer2.Add(self.buttonUpdate, proportion=0, border=2, flag=wx.ALL)
self.sizer3.Add(self.buttonGplot, proportion=0, border=2, flag=wx.ALL)
self.sizer3.Add(self.buttonPrev, proportion=0, border=2, flag=wx.ALL)
self.sizer3.Add(self.buttonPlot, proportion=0, border=2, flag=wx.ALL)
self.sizer4.Add(self.buttonSave, proportion=0, border=2, flag=wx.ALL)
self.sizer4.Add(self.buttonNext, proportion=0, border=2, flag=wx.ALL)
self.sizer4.Add(self.buttonClear, proportion=0, border=2, flag=wx.ALL)
self.sizer.Add(self.sizer2, 0, wx.TOP)
self.sizer.Add(self.sizer3, 0)
self.sizer.Add(self.sizer4, 0)
self.SetSizer(self.sizer)
self.sheetcounter=[]
#Begin Google Sheets Function-------------------------------------------------------------
def googlefunc(self, e):
usernam = wx.TextEntryDialog(None, "Enter Novel Responses Username")
if usernam.ShowModal()==wx.ID_OK:
usernm=usernam.GetValue()
usernam.Destroy()
else:
usernam.Destroy()
convert=usernm + "@gmail.com"
dlg1 = wx.PasswordEntryDialog(parent=None,message="Please enter your password")
if dlg1.ShowModal()==wx.ID_OK:
pw=dlg1.GetValue()
dlg1.Destroy
gc = gspread.login(convert, pw)
dlg2 = wx.TextEntryDialog(None, "Which client would you like to view progress of?")
if dlg2.ShowModal()==wx.ID_OK:
self.client=dlg2.GetValue()
dlg2.Destroy()
wks = gc.open(self.client)
for i, worksheet in enumerate(wks.worksheets()):
filename = self.client + '-worksheet' + str(i) + '.csv'
with open(filename, 'wb') as f:
writer = csv.writer(f)
writer.writerows(worksheet.get_all_values())
self.sheetcount = i + 1
print "There are "+str(self.sheetcount)+" client goals that have been charted."
self.gplot(jor=0, currentsheet=0)
def gplot(self, jor, currentsheet):
lst = ["Bar Series", "Multiple Vertical Axes"]
if jor < (self.sheetcount):
df = pd.read_csv((self.client+'-worksheet'+str(currentsheet)+'.csv'), index_col=0, header=0, sep=',')
phasechange = df['Phase Change'].dropna()
phaselabel=df['Phase Label'].values
phaselabel1=phaselabel
print phaselabel1
get_title=str(df['Title'].iloc[0])
get_y=str(df['Y-Axis Title'].iloc[0])
get_x=df.index.name
df=df.dropna(axis=1)
markers=itertools.cycle(('o', 's', 'D', 's', 'h', '8'))
markercolor=itertools.cycle(('k', 'w'))
max_value=(df.values.max()) * 1.5
print max_value
fig=plt.figure(1)
ax=self.axe
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')
ax.set_ylabel(get_y)
ax.axes.set_ylim([0, max_value])
fig.set_tight_layout(True)
for col in (df):
df[col].plot(x=get_x, grid=False, marker=markers.next(), markerfacecolor=markercolor.next(), title=get_title, color='k', ax=ax)
for phase in phasechange:
ax.axvline(x=phase, ymin=0, ymax=1.0, linewidth=12, color='w')
ax.axvline(x=phase, ymin=0, ymax=1.0, linewidth=1, color='k')
phasechange = phasechange + 1
self.figurecanvas.draw()
#dlg3 = wx.MultiChoiceDialog( self, "Choose Specific Options for your plot", "Plot Options", lst)
#if (dlg3.ShowModal() == wx.ID_OK):
#selections = dlg3.GetSelections()
#strings = [lst[x] for x in selections]
#if "Bar Series" and "Multiple Vertical Axes" in strings:
#print "You selected Bar series and multi vert axis"
#dlg4 = wx.TextEntryDialog(None, "Which series would you like to bar?")
#if dlg4.ShowModal()==wx.ID_OK:
#get_bar=dlg2.GetValue()
#dlg4.Destroy()
#use Recursion here call gplot again"
#dlg3.Destroy()
#elif "Bar Series" in strings:
#print "You selected Bar Series"
#else:
#dlg3.Destroy()
return (jor, currentsheet)
#self.deletecsv(sheetcount, currentsheet, client)
#def deletecsv(self, sheetcount, currentsheet, client):
#currentsheet=0
#for _ in xrange(sheetcount):
#os.remove(client+'-worksheet'+str(currentsheet)+'.csv')
#currentsheet=currentsheet + 1
#--END Gplot Function-------------------------------------------------------------------------
#--Next Button Function-----------------------------------------------------------------------
def nextButtonFunc(self, event):
if len(self.sheetcounter) < (self.sheetcount):
self.sheetcounter.append('l')
i2=len(self.sheetcounter)
jor, currentsheet = self.gplot(jor=i2, currentsheet=i2)
self.axe.clear()
print jor, currentsheet
self.gplot(jor, currentsheet)
#--Prev Button Function-----------------------------------------------------------------------
def prevButtonFunc(self, event):
if 0< len(self.sheetcounter)
Подробнее здесь: https://stackoverflow.com/questions/283 ... ded-py2app
Превышена максимальная глубина рекурсии py2App ⇐ Python
Программы на Python
-
Anonymous
1731948297
Anonymous
Я довольно тщательно искал в Google, но не нашел ответа на этот вопрос. Когда я пытаюсь выполнить сборку с помощью py2app, я получаю следующую ошибку:
Может ли это быть вызвано использованием в коде такого модуля, как «gspread»? Или потому, что я использую wxpython? Беспокоит то, что «python setup.py py2app -A» работает без проблем.
running py2app
creating /Users/Bailejor/Desktop/build/bdist.macosx-10.5-x86_64/python2.7-standalone/app
creating /Users/Bailejor/Desktop/build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/collect
creating /Users/Bailejor/Desktop/build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/temp
creating build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/lib-dynload
creating build/bdist.macosx-10.5-x86_64/python2.7-standalone/app/Frameworks
*** using recipe: virtualenv ***
*** using recipe: ftplib ***
*** using recipe: lxml ***
*** using recipe: PIL ***
*** using recipe: xml ***
*** using recipe: sip ***
*** using recipe: matplotlib ***
*** using recipe: pydoc ***
*** using recipe: docutils ***
*** using recipe: scipy ***
Traceback (most recent call last):
File "setup.py", line 18, in
setup_requires=['py2app'],
File "//anaconda/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "//anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 659, in run
self._run()
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 865, in _run
self.run_normal()
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 943, in run_normal
self.process_recipes(mf, filters, flatpackages, loader_files)
File "//anaconda/lib/python2.7/site-packages/py2app-0.9-py2.7.egg/py2app/build_app.py", line 833, in process_recipes
find_needed_modules(mf, packages=rval['packages'])
File "//anaconda/lib/python2.7/site-packages/modulegraph/find_modules.py", line 289, in find_needed_modules
m = mf.import_hook(package, None, ["*"])
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 927, in import_hook
for s in self._ensure_fromlist(m, fromlist):
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1053, in _ensure_fromlist
submod = self._import_module(sub, fullname, m)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1260, in _scan_ast
visitor.visit(co)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 249, in generic_visit
self.visit(item)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 615, in visit_ImportFrom
self._process_import(node.module or '', _ast_names(node.names), level)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1029, in _load_tail
result = self._import_module(head, mname, result)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1105, in _import_module
m = self._load_module(fqname, fp, pathname, stuff)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1178, in _load_module
self._scan_code(co, m)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1251, in _scan_code
self._scan_ast(co, m)
File "//anaconda/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1260, in _scan_ast
visitor.visit(co)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 249, in generic_visit
self.visit(item)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 251, in generic_visit
self.visit(value)
File "//anaconda/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "//anaconda/lib/python2.7/ast.py", line 245, in generic_visit
for field, value in iter_fields(node):
RuntimeError: maximum recursion depth exceeded
Вот мой предложенный код (спасибо за предложение):
import wx
import wx.grid as gridlib
import numpy as np
import pandas as pd
import csv
import matplotlib.pyplot as plt
import os
import itertools
from itertools import chain
import getpass
import gspread
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.figure import Figure
import sys
####################################################################################################
class TopPanel(wx.Panel):
""""""
#Top PANEL
#----------------------------------------------------------------------
def __init__(self, parent):
"""Constructor"""
wx.Panel.__init__(self, parent=parent)
grid = gridlib.Grid(self)
grid.CreateGrid(25,12)
grid.SetColLabelValue(0, "Index")
self.buttonPlus = wx.Button(self, wx.NewId(), "+", size=(50, 28))
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(grid, 0, wx.EXPAND)
self.SetSizer(sizer)
########################################################################################################
class BottomPanel(wx.Panel):
""""""
#Bottom PANEL
#----------------------------------------------------------------------
def __init__(self, parent):
"""Constructor"""
wx.Panel.__init__(self, parent=parent)
#Sizers------------------------------------------------------------
self.sizer = wx.BoxSizer(wx.HORIZONTAL)
self.sizer2=wx.BoxSizer(wx.VERTICAL)
self.sizer3=wx.BoxSizer(wx.VERTICAL)
self.sizer4=wx.BoxSizer(wx.VERTICAL)
#-----------------------------------------------------------------
self.figure = Figure(figsize=(1,2))
self.axe = self.figure.add_subplot(111)
self.figurecanvas = FigureCanvas(self, -1, self.figure)
self.barseries = wx.TextCtrl(self, size=(140, -1))
self.lblname = wx.StaticText(self, label="Enter Series to Bar:")
self.buttonUpdate = wx.Button(self, label="Update Figure")
self.buttonPlot = wx.Button(self, wx.NewId(), "Plot", size=(60,28))
self.buttonClear = wx.Button(self, wx.NewId(), "Clear", size=(60,28))
self.buttonSave=wx.Button(self, wx.NewId(), "Save", size=(60, 28))
self.buttonNext=wx.Button(self, wx.NewId(), "Next", size=(60, 28))
self.buttonPrev=wx.Button(self, wx.NewId(), "Last", size=(60, 28))
self.buttonGplot=wx.Button(self, wx.NewId(), "Gplot", size=(60, 28))
sampleList = ['Yes', 'No']
self.rb = wx.RadioBox(self, wx.ID_ANY, "Secondary Vertical Axis", wx.DefaultPosition, wx.DefaultSize, sampleList, 2, wx.RA_SPECIFY_COLS)
#Button Binders------------------------------------------------------
self.buttonSave.Bind(wx.EVT_BUTTON, self.saveFig)
self.buttonPlot.Bind(wx.EVT_BUTTON, self.plotFig)
self.buttonClear.Bind(wx.EVT_BUTTON, self.clearFig)
self.buttonGplot.Bind(wx.EVT_BUTTON, self.googlefunc)
self.buttonNext.Bind(wx.EVT_BUTTON, self.nextButtonFunc)
self.buttonPrev.Bind(wx.EVT_BUTTON, self.prevButtonFunc)
#--------------------------------------------------------------------
#Add to Sizers-------------------------------------------------------
self.sizer.Add(self.figurecanvas, proportion=2, border=1, flag=wx.ALL | wx.EXPAND)
self.sizer2.Add(self.rb, proportion=0, border=2, flag=wx.ALL)
self.sizer2.Add(self.lblname, proportion=0, border=2, flag=wx.ALL)
self.sizer2.Add(self.barseries, proportion=0, border=2, flag=wx.ALL)
self.sizer2.Add(self.buttonUpdate, proportion=0, border=2, flag=wx.ALL)
self.sizer3.Add(self.buttonGplot, proportion=0, border=2, flag=wx.ALL)
self.sizer3.Add(self.buttonPrev, proportion=0, border=2, flag=wx.ALL)
self.sizer3.Add(self.buttonPlot, proportion=0, border=2, flag=wx.ALL)
self.sizer4.Add(self.buttonSave, proportion=0, border=2, flag=wx.ALL)
self.sizer4.Add(self.buttonNext, proportion=0, border=2, flag=wx.ALL)
self.sizer4.Add(self.buttonClear, proportion=0, border=2, flag=wx.ALL)
self.sizer.Add(self.sizer2, 0, wx.TOP)
self.sizer.Add(self.sizer3, 0)
self.sizer.Add(self.sizer4, 0)
self.SetSizer(self.sizer)
self.sheetcounter=[]
#Begin Google Sheets Function-------------------------------------------------------------
def googlefunc(self, e):
usernam = wx.TextEntryDialog(None, "Enter Novel Responses Username")
if usernam.ShowModal()==wx.ID_OK:
usernm=usernam.GetValue()
usernam.Destroy()
else:
usernam.Destroy()
convert=usernm + "@gmail.com"
dlg1 = wx.PasswordEntryDialog(parent=None,message="Please enter your password")
if dlg1.ShowModal()==wx.ID_OK:
pw=dlg1.GetValue()
dlg1.Destroy
gc = gspread.login(convert, pw)
dlg2 = wx.TextEntryDialog(None, "Which client would you like to view progress of?")
if dlg2.ShowModal()==wx.ID_OK:
self.client=dlg2.GetValue()
dlg2.Destroy()
wks = gc.open(self.client)
for i, worksheet in enumerate(wks.worksheets()):
filename = self.client + '-worksheet' + str(i) + '.csv'
with open(filename, 'wb') as f:
writer = csv.writer(f)
writer.writerows(worksheet.get_all_values())
self.sheetcount = i + 1
print "There are "+str(self.sheetcount)+" client goals that have been charted."
self.gplot(jor=0, currentsheet=0)
def gplot(self, jor, currentsheet):
lst = ["Bar Series", "Multiple Vertical Axes"]
if jor < (self.sheetcount):
df = pd.read_csv((self.client+'-worksheet'+str(currentsheet)+'.csv'), index_col=0, header=0, sep=',')
phasechange = df['Phase Change'].dropna()
phaselabel=df['Phase Label'].values
phaselabel1=phaselabel
print phaselabel1
get_title=str(df['Title'].iloc[0])
get_y=str(df['Y-Axis Title'].iloc[0])
get_x=df.index.name
df=df.dropna(axis=1)
markers=itertools.cycle(('o', 's', 'D', 's', 'h', '8'))
markercolor=itertools.cycle(('k', 'w'))
max_value=(df.values.max()) * 1.5
print max_value
fig=plt.figure(1)
ax=self.axe
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')
ax.set_ylabel(get_y)
ax.axes.set_ylim([0, max_value])
fig.set_tight_layout(True)
for col in (df):
df[col].plot(x=get_x, grid=False, marker=markers.next(), markerfacecolor=markercolor.next(), title=get_title, color='k', ax=ax)
for phase in phasechange:
ax.axvline(x=phase, ymin=0, ymax=1.0, linewidth=12, color='w')
ax.axvline(x=phase, ymin=0, ymax=1.0, linewidth=1, color='k')
phasechange = phasechange + 1
self.figurecanvas.draw()
#dlg3 = wx.MultiChoiceDialog( self, "Choose Specific Options for your plot", "Plot Options", lst)
#if (dlg3.ShowModal() == wx.ID_OK):
#selections = dlg3.GetSelections()
#strings = [lst[x] for x in selections]
#if "Bar Series" and "Multiple Vertical Axes" in strings:
#print "You selected Bar series and multi vert axis"
#dlg4 = wx.TextEntryDialog(None, "Which series would you like to bar?")
#if dlg4.ShowModal()==wx.ID_OK:
#get_bar=dlg2.GetValue()
#dlg4.Destroy()
#use Recursion here call gplot again"
#dlg3.Destroy()
#elif "Bar Series" in strings:
#print "You selected Bar Series"
#else:
#dlg3.Destroy()
return (jor, currentsheet)
#self.deletecsv(sheetcount, currentsheet, client)
#def deletecsv(self, sheetcount, currentsheet, client):
#currentsheet=0
#for _ in xrange(sheetcount):
#os.remove(client+'-worksheet'+str(currentsheet)+'.csv')
#currentsheet=currentsheet + 1
#--END Gplot Function-------------------------------------------------------------------------
#--Next Button Function-----------------------------------------------------------------------
def nextButtonFunc(self, event):
if len(self.sheetcounter) < (self.sheetcount):
self.sheetcounter.append('l')
i2=len(self.sheetcounter)
jor, currentsheet = self.gplot(jor=i2, currentsheet=i2)
self.axe.clear()
print jor, currentsheet
self.gplot(jor, currentsheet)
#--Prev Button Function-----------------------------------------------------------------------
def prevButtonFunc(self, event):
if 0< len(self.sheetcounter)
Подробнее здесь: [url]https://stackoverflow.com/questions/28323034/maximum-recursion-depth-exceeded-py2app[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия