EDITORs: Folding away pages of notebooks / sizers

I have my application constructed around a notebook. It has four pages with
controls on them.

Code:
nb=wxNotebook(self,-1,pos=(0,60),size=(HauptBreite*0.80,HauptHoehe-60))

"""-------------------------------------------------------------------------

···

-----------------
       Seite 1
----------------------------------------------------------------------------
--------------"""
s1=wxPanel(nb,-1)
nb.AddPage(s1,"Kunde / Konzern")
[....]

s2=wxPanel(nb,-1)
nb.AddPage(s1,"Tools")
[....]

Now I would like to "fold away" the code of the pages. In pythonwin or
scintilly (scite). But:
folding is connected to the Syntax of pyhton.

So it is possible to fold

for a in nasenbaer:
   pass
   pass
   pass

to only one line
for a in nasenbaer:

but I can not indent the contents of page1, page2 of my notebook unless I
write
s1=wxPanel(nb,-1)
nb.AddPage(s1,"Kunde / Konzern")
for dummy in 1:
pass
pass
[....]

that works, but is ugly.

Has anyone a better idea?

tnx

harald

Not really. But I would at least suggest using a simple `if` test,
rather than implying a `for` loop:

  if 1:
      pass
      pass
      [...]

For Python 2.2.1 or later you can do:

  if True:

Or you can use the true defined in wx:

  from wxPython import wx

  if wx.true:

Or if you take the import * approach:

  from wxPython.wx import *

  if true:

···

On Sunday 17 November 2002 08:52 am, Harald Massa wrote:

Now I would like to "fold away" the code of the pages. In pythonwin
or scintilly (scite). But:
folding is connected to the Syntax of pyhton.

but I can not indent the contents of page1, page2 of my notebook
unless I write
s1=wxPanel(nb,-1)
nb.AddPage(s1,"Kunde / Konzern")
for dummy in 1:
pass
pass
[....]

that works, but is ugly.

Has anyone a better idea?

--
Patrick K. O'Brien
Orbtech http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------