what happened to wxConfig?

An older program has the import

From wxPython.utils import wxConfig

I’ve had to reinstall my computer and have installed wxPython 2.5.2.7 for Windows and in trying to run this program, it can’t

Import wxConfig.

Furthermore, I can’t find a subdirectory utils under wxPython nor can I find a wxConfig.py anywhere. Any help would be greatly

Appreciated.

Mark

PS. sorry if this appears twice. I sent a first version off before I finally managed to subscribe to the list.

···

Mark Achtman

Max-Planck Institut für Infektionsbiologie

Schumannstr. 21/22

10117 Berlin, Germany

Tel: +4930 28460751

Fax: +4930 28460750

e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor

Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal

directly to me.

Instructions to authors at the megiid website

Read the migration guide for 2.5 , look for "The wx Namespace"

using the new wx namespace you can access the thing as
wx.Config(...)

···

On Wed, 18 Aug 2004 16:09:43 +0200, Mark Achtman <achtman@mpiib-berlin.mpg.de> wrote:

An older program has the import

From wxPython.utils import wxConfig

I’ve had to reinstall my computer and have installed wxPython 2.5.2.7 for
Windows and in trying to run this program, it can’t
Import wxConfig.

Furthermore, I can’t find a subdirectory utils under wxPython nor can I find a
wxConfig.py anywhere. Any help would be greatly
Appreciated.

--
Peter Damoc
Hacker Wannabe

great, that solved one problem. However, it immediately raised the
next one which is that within initiation of an application the call
self.list.SetWindowStyleFlag(wxSTATIC_BORDER¦wxVSCROLL)
calls
wx\controls.py SetWindowStyleFlag

in which
return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
crashes with the error
wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
because wxListCtrl style should have exactly one mode bit set.

If there is an obvious way to fix this quickly, I would be once more
grateful.

Send reply to: wxPython-users@lists.wxwidgets.org

···

To: achtman@mpiib-berlin.mpg.de, wxpython-users@lists.wxwidgets.org
Date sent: Wed, 18 Aug 2004 17:24:04 +0300
From: "Peter Damoc" <pdamoc@gmx.net>
Subject: Re: [wxPython-users] what happened to wxConfig?

On Wed, 18 Aug 2004 16:09:43 +0200, Mark Achtman > <achtman@mpiib-berlin.mpg.de> wrote:

> An older program has the import
>
> From wxPython.utils import wxConfig
>
> I’ve had to reinstall my computer and have installed wxPython 2.5.2.7 for
> Windows and in trying to run this program, it can’t
> Import wxConfig.
>
> Furthermore, I can’t find a subdirectory utils under wxPython nor can I
> find a
> wxConfig.py anywhere. Any help would be greatly
> Appreciated.

Read the migration guide for 2.5 , look for "The wx Namespace"

using the new wx namespace you can access the thing as
wx.Config(...)

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

_________________________
Mark Achtman
Max-Planck Institut für Infektionsbiologie
Schumannstr. 21/22
10117 Berlin, Germany
Tel: +4930 28460751
Fax: +4930 28460750
e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor
Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal
directly to me.

Instructions to authors at the megiid website

Yes, there's an obvious way to fix it. :wink:

self.list.SetWindowStyleFlag(wx.STATIC_BORDER¦wx.VSCROLL)
Add some dots behind the wxs.

···

On Wed, 18 Aug 2004 17:02:21 +0200, Mark Achtman <achtman@mpiib-berlin.mpg.de> wrote:

great, that solved one problem. However, it immediately raised the
next one which is that within initiation of an application the call
self.list.SetWindowStyleFlag(wxSTATIC_BORDER¦wxVSCROLL)
calls
wx\controls.py SetWindowStyleFlag

in which
return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
crashes with the error
wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
because wxListCtrl style should have exactly one mode bit set.

If there is an obvious way to fix this quickly, I would be once more
grateful.

Send reply to: wxPython-users@lists.wxwidgets.org
To: achtman@mpiib-berlin.mpg.de, wxpython-users@lists.wxwidgets.org
Date sent: Wed, 18 Aug 2004 17:24:04 +0300
From: "Peter Damoc" <pdamoc@gmx.net>
Subject: Re: [wxPython-users] what happened to wxConfig?

> On Wed, 18 Aug 2004 16:09:43 +0200, Mark Achtman > > <achtman@mpiib-berlin.mpg.de> wrote:
>
> > An older program has the import
> >
> > From wxPython.utils import wxConfig
> >
> > I’ve had to reinstall my computer and have installed wxPython 2.5.2.7 for
> > Windows and in trying to run this program, it can’t
> > Import wxConfig.
> >
> > Furthermore, I can’t find a subdirectory utils under wxPython nor can I
> > find a
> > wxConfig.py anywhere. Any help would be greatly
> > Appreciated.
>
> Read the migration guide for 2.5 , look for "The wx Namespace"
>
> using the new wx namespace you can access the thing as
> wx.Config(...)
>
> --
> Peter Damoc
> Hacker Wannabe
> http://www.sigmacore.net/

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>

_________________________
Mark Achtman
Max-Planck Institut für Infektionsbiologie
Schumannstr. 21/22
10117 Berlin, Germany
Tel: +4930 28460751
Fax: +4930 28460750
e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor
Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal
directly to me.

Instructions to authors at the megiid website

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

the fix is in the error message :smiley:
remove the wxSTATIC_BORDER| part and live it like in:
self.list.SetWindowStyleFlag(wxVSCROLL)
or
self.list.SetWindowStyleFlag(wx.VSCROLL)

···

On Wed, 18 Aug 2004 17:02:21 +0200, Mark Achtman <achtman@mpiib-berlin.mpg.de> wrote:

great, that solved one problem. However, it immediately raised the
next one which is that within initiation of an application the call
self.list.SetWindowStyleFlag(wxSTATIC_BORDER¦wxVSCROLL)
calls
wx\controls.py SetWindowStyleFlag

in which
return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
crashes with the error
wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
because wxListCtrl style should have exactly one mode bit set.

If there is an obvious way to fix this quickly, I would be once more
grateful.

--
Peter Damoc
Hacker Wannabe

Thanks for the suggestions. Unfortunately, neither helped. Changing
wxSTATIC_BORDER to wx.STATIC_BORDER and wxVSCROLL to
wx.VSCROLL didn't change the problem. Similarly, deleting
wxSTATIC_BORDER and using wxVSCROLL or wx.VSCROLL also
didn't help.

I attach the whole function, maybe there is something else in there that
will be obvious to you and which I'm missing

fragment.py (2.75 KB)

···

On Wed, 18 Aug 2004 17:02:21 +0200, Mark Achtman > <achtman@mpiib-berlin.mpg.de> wrote:

> great, that solved one problem. However, it immediately raised the
> next one which is that within initiation of an application the call
> self.list.SetWindowStyleFlag(wxSTATIC_BORDER|wxVSCROLL)
> calls
> wx\controls.py SetWindowStyleFlag
>
> in which
> return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
> crashes with the error
> wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
> because wxListCtrl style should have exactly one mode bit set.
>
> If there is an obvious way to fix this quickly, I would be once more
> grateful.

the fix is in the error message :smiley:
remove the wxSTATIC_BORDER| part and live it like in:
self.list.SetWindowStyleFlag(wxVSCROLL)
or
self.list.SetWindowStyleFlag(wx.VSCROLL)

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

_________________________
Mark Achtman
Max-Planck Institut für Infektionsbiologie
Schumannstr. 21/22
10117 Berlin, Germany
Tel: +4930 28460751
Fax: +4930 28460750
e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor
Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal
directly to me.

Instructions to authors at the megiid website

All wxSomethingSomething should now be wx.SomethingSomething, check
the migration guide on the wxPython site. Find any instance of 'wx'
and replace it with 'wx.' and see if that helps the app.

···

On Wed, 18 Aug 2004 17:35:04 +0200, Mark Achtman <achtman@mpiib-berlin.mpg.de> wrote:

Thanks for the suggestions. Unfortunately, neither helped. Changing
wxSTATIC_BORDER to wx.STATIC_BORDER and wxVSCROLL to
wx.VSCROLL didn't change the problem. Similarly, deleting
wxSTATIC_BORDER and using wxVSCROLL or wx.VSCROLL also
didn't help.

I attach the whole function, maybe there is something else in there that
will be obvious to you and which I'm missing

> On Wed, 18 Aug 2004 17:02:21 +0200, Mark Achtman > > <achtman@mpiib-berlin.mpg.de> wrote:
>
> > great, that solved one problem. However, it immediately raised the
> > next one which is that within initiation of an application the call
> > self.list.SetWindowStyleFlag(wxSTATIC_BORDER|wxVSCROLL)
> > calls
> > wx\controls.py SetWindowStyleFlag
> >
> > in which
> > return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
> > crashes with the error
> > wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
> > because wxListCtrl style should have exactly one mode bit set.
> >
> > If there is an obvious way to fix this quickly, I would be once more
> > grateful.
>
> the fix is in the error message :smiley:
> remove the wxSTATIC_BORDER| part and live it like in:
> self.list.SetWindowStyleFlag(wxVSCROLL)
> or
> self.list.SetWindowStyleFlag(wx.VSCROLL)
>
> --
> Peter Damoc
> Hacker Wannabe
> http://www.sigmacore.net/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>

_________________________
Mark Achtman
Max-Planck Institut für Infektionsbiologie
Schumannstr. 21/22
10117 Berlin, Germany
Tel: +4930 28460751
Fax: +4930 28460750
e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor
Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal
directly to me.

Instructions to authors at the megiid website

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File: fragment.py
     Date: 18 Aug 2004, 17:20
     Size: 2816 bytes.
     Type: Text

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

This sounds great but doesn't seem to be true according to the editor
I'm using or I'm missing an import.

There doesn't seem to be a wx.PyDefaultPosition but there does seem
to be a wx.BITMAP_TYPE_ICO. Possibly there are simple rules on
what could or should be replaced by wx. ???

Send reply to: wxPython-users@lists.wxwidgets.org
Date sent: Wed, 18 Aug 2004 17:43:50 +0200

···

From: Mikael Norgren <that1swede@gmail.com>
Send reply to: Mikael Norgren <that1swede@gmail.com>
To: wxpython-users@lists.wxwidgets.org, achtman@mpiib-berlin.mpg.de
Subject: Re: [wxPython-users] what happened to wxConfig?

All wxSomethingSomething should now be wx.SomethingSomething, check
the migration guide on the wxPython site. Find any instance of 'wx'
and replace it with 'wx.' and see if that helps the app.

On Wed, 18 Aug 2004 17:35:04 +0200, Mark Achtman > <achtman@mpiib-berlin.mpg.de> wrote:
> Thanks for the suggestions. Unfortunately, neither helped. Changing
> wxSTATIC_BORDER to wx.STATIC_BORDER and wxVSCROLL to
> wx.VSCROLL didn't change the problem. Similarly, deleting
> wxSTATIC_BORDER and using wxVSCROLL or wx.VSCROLL also
> didn't help.
>
> I attach the whole function, maybe there is something else in there that
> will be obvious to you and which I'm missing
>
> > On Wed, 18 Aug 2004 17:02:21 +0200, Mark Achtman > > > <achtman@mpiib-berlin.mpg.de> wrote:
> >
> > > great, that solved one problem. However, it immediately raised the
> > > next one which is that within initiation of an application the call
> > > self.list.SetWindowStyleFlag(wxSTATIC_BORDER|wxVSCROLL)
> > > calls
> > > wx\controls.py SetWindowStyleFlag
> > >
> > > in which
> > > return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
> > > crashes with the error
> > > wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
> > > because wxListCtrl style should have exactly one mode bit set.
> > >
> > > If there is an obvious way to fix this quickly, I would be once more
> > > grateful.
> >
> > the fix is in the error message :smiley:
> > remove the wxSTATIC_BORDER| part and live it like in:
> > self.list.SetWindowStyleFlag(wxVSCROLL)
> > or
> > self.list.SetWindowStyleFlag(wx.VSCROLL)
> >
> > --
> > Peter Damoc
> > Hacker Wannabe
> > http://www.sigmacore.net/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> > For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
> >
>
>
> _________________________
> Mark Achtman
> Max-Planck Institut für Infektionsbiologie
> Schumannstr. 21/22
> 10117 Berlin, Germany
> Tel: +4930 28460751
> Fax: +4930 28460750
> e-mail: achtman@mpiib-berlin.mpg.de
>
> Co-Editor
> Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid
>
> You are invited to submit articles for the above journal
> directly to me.
>
> Instructions to authors at the megiid website
>
>
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
> ---- File information -----------
> File: fragment.py
> Date: 18 Aug 2004, 17:20
> Size: 2816 bytes.
> Type: Text
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

_________________________
Mark Achtman
Max-Planck Institut für Infektionsbiologie
Schumannstr. 21/22
10117 Berlin, Germany
Tel: +4930 28460751
Fax: +4930 28460750
e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor
Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal
directly to me.

Instructions to authors at the megiid website

There's a wx.DefaultPosition I've never used or seen a
wxPyDefaultPosition before.. but then again I just recently started
learning wxPython. Is there a difference between wx.DefaultPosition
and the wxPyDefaultPosition you've got? Try using wx.DefaultPosition?

···

On Wed, 18 Aug 2004 18:05:11 +0200, Mark Achtman <achtman@mpiib-berlin.mpg.de> wrote:

This sounds great but doesn't seem to be true according to the editor
I'm using or I'm missing an import.

There doesn't seem to be a wx.PyDefaultPosition but there does seem
to be a wx.BITMAP_TYPE_ICO. Possibly there are simple rules on
what could or should be replaced by wx. ???

Send reply to: wxPython-users@lists.wxwidgets.org
Date sent: Wed, 18 Aug 2004 17:43:50 +0200
From: Mikael Norgren <that1swede@gmail.com>
Send reply to: Mikael Norgren <that1swede@gmail.com>
To: wxpython-users@lists.wxwidgets.org, achtman@mpiib-berlin.mpg.de
Subject: Re: [wxPython-users] what happened to wxConfig?

> All wxSomethingSomething should now be wx.SomethingSomething, check
> the migration guide on the wxPython site. Find any instance of 'wx'
> and replace it with 'wx.' and see if that helps the app.
>
> On Wed, 18 Aug 2004 17:35:04 +0200, Mark Achtman > > <achtman@mpiib-berlin.mpg.de> wrote:
> > Thanks for the suggestions. Unfortunately, neither helped. Changing
> > wxSTATIC_BORDER to wx.STATIC_BORDER and wxVSCROLL to
> > wx.VSCROLL didn't change the problem. Similarly, deleting
> > wxSTATIC_BORDER and using wxVSCROLL or wx.VSCROLL also
> > didn't help.
> >
> > I attach the whole function, maybe there is something else in there that
> > will be obvious to you and which I'm missing
> >
> > > On Wed, 18 Aug 2004 17:02:21 +0200, Mark Achtman > > > > <achtman@mpiib-berlin.mpg.de> wrote:
> > >
> > > > great, that solved one problem. However, it immediately raised the
> > > > next one which is that within initiation of an application the call
> > > > self.list.SetWindowStyleFlag(wxSTATIC_BORDER|wxVSCROLL)
> > > > calls
> > > > wx\controls.py SetWindowStyleFlag
> > > >
> > > > in which
> > > > return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
> > > > crashes with the error
> > > > wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ...
> > > > because wxListCtrl style should have exactly one mode bit set.
> > > >
> > > > If there is an obvious way to fix this quickly, I would be once more
> > > > grateful.
> > >
> > > the fix is in the error message :smiley:
> > > remove the wxSTATIC_BORDER| part and live it like in:
> > > self.list.SetWindowStyleFlag(wxVSCROLL)
> > > or
> > > self.list.SetWindowStyleFlag(wx.VSCROLL)
> > >
> > > --
> > > Peter Damoc
> > > Hacker Wannabe
> > > http://www.sigmacore.net/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> > > For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
> > >
> >
> >
> > _________________________
> > Mark Achtman
> > Max-Planck Institut für Infektionsbiologie
> > Schumannstr. 21/22
> > 10117 Berlin, Germany
> > Tel: +4930 28460751
> > Fax: +4930 28460750
> > e-mail: achtman@mpiib-berlin.mpg.de
> >
> > Co-Editor
> > Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid
> >
> > You are invited to submit articles for the above journal
> > directly to me.
> >
> > Instructions to authors at the megiid website
> >
> >
> >
> > The following section of this message contains a file attachment
> > prepared for transmission using the Internet MIME message format.
> > If you are using Pegasus Mail, or any other MIME-compliant system,
> > you should be able to save it or view it from within your mailer.
> > If you cannot, please ask your system administrator for assistance.
> >
> > ---- File information -----------
> > File: fragment.py
> > Date: 18 Aug 2004, 17:20
> > Size: 2816 bytes.
> > Type: Text
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> > For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>

_________________________
Mark Achtman
Max-Planck Institut für Infektionsbiologie
Schumannstr. 21/22
10117 Berlin, Germany
Tel: +4930 28460751
Fax: +4930 28460750
e-mail: achtman@mpiib-berlin.mpg.de

Co-Editor
Infection, Genetics and Evolution - http://www.elsevier.nl/locate/meegid

You are invited to submit articles for the above journal
directly to me.

Instructions to authors at the megiid website

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Mark Achtman wrote:

great, that solved one problem. However, it immediately raised the next one which is that within initiation of an application the call
self.list.SetWindowStyleFlag(wxSTATIC_BORDER¦wxVSCROLL)
calls
wx\controls.py SetWindowStyleFlag

in which return _control_.ListCtrl_SetWindowStyleFlag(*args,**kwargs)
crashes with the error
wx._core.PyAssertionError: C++ assertion "nModes == 1" failed ... because wxListCtrl style should have exactly one mode bit set.

If there is an obvious way to fix this quickly, I would be once more grateful.

The error means that there must be exactly one of wxLC_ICON, wxLC_SMALL_ICON, wxLC_LIST, or wxLC_REPORT set. When you use SetWindowStyleFlag you are replacing the style with what you pass. If you would like to add to what is already there then use SetSingleStyle.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!