Commit 6bb62649 authored by VIGNET Pierre's avatar VIGNET Pierre

PEP8 fix

parent ea755c0d
......@@ -213,41 +213,41 @@ class Charter(object):
self.button_handlers = dict()
c_box = self.wtree.get_widget("controler_box")
but = gtk.Button(label = "Select")
but = gtk.Button(label="Select")
c_box.add(but)
self.button_handlers["Select"] = (but, -1)
but = gtk.Button(label = "InputNode (F1)")
but = gtk.Button(label="InputNode (F1)")
self.add_accelerator(but, "F1")
c_box.add(but)
self.button_handlers["InputNode"] = (but, -1)
but = gtk.Button(label = "SimpleNode (F2)")
but = gtk.Button(label="SimpleNode (F2)")
self.add_accelerator(but, "F2")
c_box.add(but)
self.button_handlers["SimpleNode"] = (but, -1)
but = gtk.Button(label = "PermNode (F3)")
but = gtk.Button(label="PermNode (F3)")
self.add_accelerator(but, "F3")
c_box.add(but)
self.button_handlers["PermNode"] = (but, -1)
but = gtk.Button(label = "StartNode (F4)")
but = gtk.Button(label="StartNode (F4)")
self.add_accelerator(but, "F4")
c_box.add(but)
self.button_handlers["StartNode"] = (but, -1)
but = gtk.Button(label = "TrapNode (F5)")
but = gtk.Button(label="TrapNode (F5)")
self.add_accelerator(but, "F5")
c_box.add(but)
self.button_handlers["TrapNode"] = (but, -1)
but = gtk.Button(label = "Transition (F6)")
but = gtk.Button(label="Transition (F6)")
self.add_accelerator(but, "F6")
c_box.add(but)
self.button_handlers["Transition"] = (but, -1)
but = gtk.Button(label = "Constraints (F7)")
but = gtk.Button(label="Constraints (F7)")
self.add_accelerator(but, "F7")
c_box.add(but)
self.button_handlers["Constraints"] = (but, -1)
......@@ -383,7 +383,7 @@ class Charter(object):
def add_edit_mvc(self, model_name, model = None, layout = False):
def add_edit_mvc(self, model_name, model=None, layout=False):
"""
create, register and display a new edit_mvc - close all windows
associated with a previous edit_mvc
......@@ -401,7 +401,7 @@ class Charter(object):
self.set_current_edit_mvc(edm)
self.graph_notebook.set_current_page(page_index)
def add_display_mvc(self, model_name, model = None, layout = False):
def add_display_mvc(self, model_name, model=None, layout=False):
"""
create, register and display a new edit_mvc
"""
......@@ -414,7 +414,7 @@ class Charter(object):
# insert in emvc management
page_index = self.graph_notebook.append_page(edm.viewpage, eventbox)
self.edit_mvc_list.append(edm)
self.set_current_edit_mvc(edm , False) # do not destroy aux windows
self.set_current_edit_mvc(edm, False) # do not destroy aux windows
self.graph_notebook.set_current_page(page_index)
......@@ -556,10 +556,10 @@ class Charter(object):
model = self.current_edit_mvc.model
try:
xml = XmlVisitor(model)
mfile = open(xml_file,'w')
mfile = open(xml_file, 'w')
mfile.write(xml.return_xml())
mfile.close()
except XmlException, xec:
except XmlException as xec:
cancel_warn(xec.message)
return
......@@ -615,7 +615,7 @@ class Charter(object):
return
model = parser.model
self.add_edit_mvc(model.name, model, False)
self.do_layout(None,"hierarchical_LR")
self.do_layout(None, "hierarchical_LR")
def choose_pid_file(self, widget):
......@@ -641,7 +641,7 @@ class Charter(object):
"""
Compile in view of exporting
"""
out = open(file_name,"w")
out = open(file_name, "w")
# decompiler visitor
lvi = LangVisitor(out)
edm = self.current_edit_mvc
......@@ -691,7 +691,7 @@ class Charter(object):
pxm = edm.view.pixmap
pxb = Pixbuf(COLORSPACE_RGB, False, 8,
edm.view.draw_width, edm.view.draw_height)
pxb.get_from_drawable(pxm, colormap_get_system() , 0, 0, 0, 0, -1, -1)
pxb.get_from_drawable(pxm, colormap_get_system(), 0, 0, 0, 0, -1, -1)
if suff == 'png':
pxb.save(file_name, 'png')
elif suff == 'jpg':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment