pyscripter

G

Gigs_

im using pyscripter ide

it is all alright till the next def

class Checkbar(Frame):
def __init__(self, parent=None, picks=[], side=LEFT, anchor=W):
Frame.__init__(self, parent)
self.vars = []
for pick in picks:
var = IntVar()
chk = Checkbutton(self, text=pick, variable=var)
chk.pack(side=side, anchor=anchor, expand=YES)
self.vars.append(var)
# it is all alright till here, but if im going to write next
# class method it wont go with tab for 4 fields
# it goes here all the time (8 fields)




if i remove for statement it all work fine
 
G

Gabriel Genellina

im using pyscripter ide

it is all alright till the next def

class Checkbar(Frame):
def __init__(self, parent=None, picks=[], side=LEFT, anchor=W):
Frame.__init__(self, parent)
self.vars = []
for pick in picks:
var = IntVar()
chk = Checkbutton(self, text=pick, variable=var)
chk.pack(side=side, anchor=anchor, expand=YES)
self.vars.append(var)
# it is all alright till here, but if im going to write next
# class method it wont go with tab for 4 fields
# it goes here all the time (8 fields)
if i remove for statement it all work fine

I don't use pyscripter myself, but how could it know that you aren't going
to write more code for the __init__ method?
Reading the manual might be helpful... Try backspace, shift-tab, an empty
line...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top