34 print "scripting.py: a python gui for scripting"
54 return fnmatch.fnmatch(x,
'*.txt')
70 tmpFrame=Frame(self.
mastermaster, relief=SUNKEN)
72 tmpFrame.columnconfigure(0, minsize=150)
73 tmpFrame.columnconfigure(1, minsize=150)
75 Label(tmpFrame, text=
"Scripts:").grid(row=0,column=0, sticky=N+W)
81 tmpFrame.grid(row=r, column=c, sticky=W)
82 tmpApp=Label(tmpFrame, text=sc, relief=SUNKEN).grid(row=r, column=0, sticky=N+W+E)
84 tmp=Button(tmpFrame, text=
"Run", command=
lambda i=sc:self.
runScriptrunScript(i))
85 tmp.grid(row=r, column=2, sticky=N)
93 f=open(os.path.join(directory, script),
'r')
95 line=line.rstrip(
'\r\n')
105 all=os.listdir(scriptDir)
110 if (
not os.path.isdir(c)):
123 Label(frame, text=script).grid(row=0, column=0, sticky=W)
124 bottom=Frame(frame).grid(row=1, column=0)
125 f=open(os.path.join(directory, script),
'r')
130 line=line.rstrip(
'\r\n')
134 tmp.insert(END,
'ciao')
136 tmp.grid(row=r,column=0)
140 tmp=Button(bottom, text=
"Save", command=self.
savesave())
141 tmp.grid(row=r, column=0, sticky=N)
143 tmp=Button(bottom, text=
"Add", command=self.
addLineaddLine())
144 tmp.grid(row=r, column=1, sticky=N)
146 tmp=Button(bottom, text=
"Remove", command=self.
removeLineremoveLine())
147 tmp.grid(row=r, column=2, sticky=N)
151 width=frame.winfo_width()
152 height=frame.winfo_height()
153 rootx=master.winfo_rootx()
154 rooty=master.winfo_rooty()
159 for l
in self.
lineslines:
160 tmp=Entry(self.
mastermaster)
162 tmp.grid(row=r,column=0)
166 tmp=Entry(self.
mastermaster)
171 self.
lineslines.pop()
175 f=open(os.path.join(directory,
'temp.txt'),
'w')
177 for l
in self.
lineslines:
182 if __name__ ==
'__main__':
187 directory=sys.argv[1]
197 app.setScriptsList(scripts, directory)
def editScript(self, script)
def __init__(self, master)
def setScriptsList(self, scripts, directory)
def runScript(self, script)
def __init__(self, master, directory, script)
void append(const size_t index, shared_ptr< Epsilon_neighbours_t > en)
def printUsage(scriptName)
def searchScripts(scriptDir)
def pruneContexts(appDirs, allContexts)