Are the wiki examples now out of date?

While playing with examples from the wxPython Wiki, I noticed that things didn't seem to work as advertised. I had downloaded the latest 2.5.2.x binary release for Windows. Is this the API compatibility that folks were talking about a week or so ago? I'm guessing that the wiki is based on 2.4.x API calls.

Assuming this is the case, is there a plan to update the Wiki? If so, I will help out where I can. It would be a good learning experience. I'm thinking along the lines of prefacing the existing examples as 'pre-2.5' and rewritten examples as '2.5+', keeping both in the Wiki.

Matthew Zaleski

I believe you are correct most of the examples use the old 2.4 namespace. So
as a newbie I'd like to see someone fix this issue. If I can help (remember
newbie) let me know.

John

···

On Friday 08 October 2004 07:33, Matthew Zaleski wrote:

While playing with examples from the wxPython Wiki, I noticed that things
didn't seem to work as advertised. I had downloaded the latest 2.5.2.x
binary release for Windows. Is this the API compatibility that folks were
talking about a week or so ago? I'm guessing that the wiki is based on
2.4.x API calls.

Assuming this is the case, is there a plan to update the Wiki? If so, I
will help out where I can. It would be a good learning experience. I'm
thinking along the lines of prefacing the existing examples as 'pre-2.5'
and rewritten examples as '2.5+', keeping both in the Wiki.

Matthew Zaleski

Matthew Zaleski <mzaleski@spamcop.net> writes:

While playing with examples from the wxPython Wiki, I noticed that
things didn't seem to work as advertised. I had downloaded the latest
2.5.2.x binary release for Windows. Is this the API compatibility
that folks were talking about a week or so ago? I'm guessing that the
wiki is based on 2.4.x API calls.

Assuming this is the case, is there a plan to update the Wiki? If so,
I will help out where I can. It would be a good learning experience.
I'm thinking along the lines of prefacing the existing examples as
'pre-2.5' and rewritten examples as '2.5+', keeping both in the Wiki.

[ Please, could you configure your software to break lines after,
  e.g. 70 / 80 chars? They are enormous here... ]

I'd request that the Wiki *do not* be updated, but complemented. It is
stated at wxPython's website that the latest *stable* release is from
the 2.4 series and not from the 2.5 series. Updating information to a
not stable release is not what I'd see as a wise move -- specially
because there's a lot of people working with 2.4 yet, we're working with
2.4 and 2.5 here since 2.5 had problems with Windows 98. Some features
we use in our application didn't work with wxPython 2.5 but works
perfectly with 2.4...

TIA,

···

--
Godoy. <godoy@ieee.org>

You're right the wiki examples are out of date...
feel free to change whatever you like... after all.. wikis are about contribution :slight_smile: so if you can contribute... contribute.

···

On Fri, 8 Oct 2004 10:33:23 -0400, Matthew Zaleski <mzaleski@spamcop.net> wrote:

While playing with examples from the wxPython Wiki, I noticed that things didn't seem to work as advertised. I had downloaded the latest 2.5.2.x binary release for Windows. Is this the API compatibility that folks were talking about a week or so ago? I'm guessing that the wiki is based on 2.4.x API calls.

Assuming this is the case, is there a plan to update the Wiki? If so, I will help out where I can. It would be a good learning experience. I'm thinking along the lines of prefacing the existing examples as 'pre-2.5' and rewritten examples as '2.5+', keeping both in the Wiki.

Matthew Zaleski

--
Peter Damoc
Hacker Wannabe

Jorge Godoy wrote:

Matthew Zaleski <mzaleski@spamcop.net> writes:

While playing with examples from the wxPython Wiki, I noticed that
things didn't seem to work as advertised. I had downloaded the latest
2.5.2.x binary release for Windows. Is this the API compatibility
that folks were talking about a week or so ago? I'm guessing that the
wiki is based on 2.4.x API calls.

The Wiki is not one thing, it is a collection of pages, and each one was written at a different time, and therefor could be compatible with different versions. Personally, I've been using only 2.5.* for a while, so anything I've put or updated in the wiki will reflect that.

I'd request that the Wiki *do not* be updated, but complemented.

I agree.

-First, if anyone notices an example that only works with a given version of wxPython, put a note in.

-Second, if you are using a different version of wxPython than the example, try to port it to your version, and if successful, add (don't replace) it to the page.

-Third, if you can't figure out how to get it to work with your version, send a note to the original author and/or this list, and you'll get help. I, for one NEVER revisit pages I've put in the Wiki unless someone asks me a question about it.

An exception to the above is that I would suggest that all Wiki Examples be converted to the "import wx" style. Another one is the "DC incompatibility" problem. We should only use the current DC style, using fixdc.py if necessary.

By the way, porting small examples to a different version really isn't that hard. If you get a error you don't understand, look in the Migration guide, and chances are good it will be addressed.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

That's what he said he would do (maintain both). But I think the standard one
should comply with 2.5 because that's the future. BTW might want to upgrade
to XP.
John

···

On Friday 08 October 2004 07:52, Jorge Godoy wrote:

Matthew Zaleski <mzaleski@spamcop.net> writes:
> While playing with examples from the wxPython Wiki, I noticed that
> things didn't seem to work as advertised. I had downloaded the latest
> 2.5.2.x binary release for Windows. Is this the API compatibility
> that folks were talking about a week or so ago? I'm guessing that the
> wiki is based on 2.4.x API calls.
>
> Assuming this is the case, is there a plan to update the Wiki? If so,
> I will help out where I can. It would be a good learning experience.
> I'm thinking along the lines of prefacing the existing examples as
> 'pre-2.5' and rewritten examples as '2.5+', keeping both in the Wiki.

[ Please, could you configure your software to break lines after,
  e.g. 70 / 80 chars? They are enormous here... ]

I'd request that the Wiki *do not* be updated, but complemented. It is
stated at wxPython's website that the latest *stable* release is from
the 2.4 series and not from the 2.5 series. Updating information to a
not stable release is not what I'd see as a wise move -- specially
because there's a lot of people working with 2.4 yet, we're working with
2.4 and 2.5 here since 2.5 had problems with Windows 98. Some features
we use in our application didn't work with wxPython 2.5 but works
perfectly with 2.4...

John Fabiani <jfabiani@yolo.com> writes:

That's what he said he would do (maintain both). But I think the standard one
should comply with 2.5 because that's the future. BTW might want to upgrade
to XP.

I wish my clients upgrade to Linux. :wink: the costs of a new license for
that amount of users plus hardware upgrade is something that has to be
very carefully considerated.

If my application demands that, I loose the deal and loose money.

···

--
Godoy. <godoy@ieee.org>

Matthew Zaleski wrote:

Assuming this is the case, is there a plan to update the Wiki?

No plan per se, but some folks have been tweaking things here and there.

If
so, I will help out where I can.

Please feel free.

It would be a good learning
experience. I'm thinking along the lines of prefacing the existing
examples as 'pre-2.5' and rewritten examples as '2.5+', keeping both
in the Wiki.

If the sample can be modified such that it works with both 2.4 and 2.5 without too much complexity then it would be nice to do it that way insteead of having two samples. But I'll let whoever does the editing decide which way to do it on a case-by-case basis.

···

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

Well, I'm new to wxPython but looking at the simple example:
http://wiki.wxpython.org/index.cgi/Getting_20Started#head-fb6ad9b86e3a9ec67d4501
336b69459fd6f2a3d4

There is a "from wxPython.wx import *"
Isn't that deprecated in 2.5+ to be "import wx"?

and continuing down the line, the classes are of the form wxCLASS or wx.wxCLASS
where I think the new standard is wx.CLASS.

Being new at this I'm not sure how to reconcile all the comments of "do change
it", "show both ways", "make it work on both versions".

Will wx.wxFrame eventually no longer work? Should examples still show the "from
... import *" (which is semi-weak Python style according to my studies)?

Matthew Zaleski

P.S. I turned on wrap at 80 characters. I was used to using mail programs that
understood how to wrap automatically. Didn't realize that there were programs
out there still unclear on soft wrapping.

···

On Fri, 08 Oct 2004 12:57:43 -0700, Robin Dunn wrote:

It would be a good learning
experience. I'm thinking along the lines of prefacing the
existing examples as 'pre-2.5' and rewritten examples as '2.5+',
keeping both in the Wiki.

If the sample can be modified such that it works with both 2.4 and
2.5 without too much complexity then it would be nice to do it that
way insteead of having two samples. But I'll let whoever does the
editing decide which way to do it on a case-by-case basis.

I agree let's move forward. Just make the sample doc and programs work
with .the new namespace
John

···

On Friday 08 October 2004 18:04, Matthew Zaleski wrote:

On Fri, 08 Oct 2004 12:57:43 -0700, Robin Dunn wrote:
>> It would be a good learning
>> experience. I'm thinking along the lines of prefacing the
>> existing examples as 'pre-2.5' and rewritten examples as '2.5+',
>> keeping both in the Wiki.
>
> If the sample can be modified such that it works with both 2.4 and
> 2.5 without too much complexity then it would be nice to do it that
> way insteead of having two samples. But I'll let whoever does the
> editing decide which way to do it on a case-by-case basis.

Well, I'm new to wxPython but looking at the simple example:
http://wiki.wxpython.org/index.cgi/Getting_20Started#head-fb6ad9b86e3a9ec67
d4501 336b69459fd6f2a3d4

There is a "from wxPython.wx import *"
Isn't that deprecated in 2.5+ to be "import wx"?

and continuing down the line, the classes are of the form wxCLASS or
wx.wxCLASS where I think the new standard is wx.CLASS.

Being new at this I'm not sure how to reconcile all the comments of "do
change it", "show both ways", "make it work on both versions".

Will wx.wxFrame eventually no longer work? Should examples still show the
"from ... import *" (which is semi-weak Python style according to my
studies)?

Matthew Zaleski

Matthew Zaleski wrote:

It would be a good learning
experience. I'm thinking along the lines of prefacing the
existing examples as 'pre-2.5' and rewritten examples as '2.5+',
keeping both in the Wiki.

If the sample can be modified such that it works with both 2.4 and
2.5 without too much complexity then it would be nice to do it that
way insteead of having two samples. But I'll let whoever does the
editing decide which way to do it on a case-by-case basis.

Well, I'm new to wxPython but looking at the simple example:
http://wiki.wxpython.org/index.cgi/Getting_20Started#head-fb6ad9b86e3a9ec67d4501
336b69459fd6f2a3d4

There is a "from wxPython.wx import *"
Isn't that deprecated in 2.5+ to be "import wx"?

Yes, but 2.4.2.4 can also do "import wx"

and continuing down the line, the classes are of the form wxCLASS or wx.wxCLASS where I think the new standard is wx.CLASS.

Same here.

Being new at this I'm not sure how to reconcile all the comments of "do change it", "show both ways", "make it work on both versions".

Will wx.wxFrame eventually no longer work?

Currently it depends on where "wx" comes from. :slight_smile: If it is the top-level pacakge name then it already doesn't work. If it is a sub-module of the wxPython package then it still does and probably will for a while.

Should examples still show the "from ... import *" (which is semi-weak Python style according to my studies)?

"import wx" would be preferred.

···

On Fri, 08 Oct 2004 12:57:43 -0700, Robin Dunn wrote:

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

<SNIP> (more of the same confirming new style skipped)

Alrighty!! I will putz around and try to get the latest 2.4.x installed
(already have 2.5.x on 2 machines) on a machine. I will go thru the examples in
the Getting Started section of the Wiki, make sure the "new" style works on 2.4
and 2.5, make the changes to that one Wiki page and then have the experts
confirm that I (hopefully) stumbled onto the correct WxPy way of doing things.

If that goes well, I will walk through the other tutorials in a similar fashion.

Umm, should I move this discussion thread over to wxPython-docs?

Matthew Zaleski

···

On Sat, 09 Oct 2004 17:44:51 -0700, Robin Dunn wrote:

Matthew Zaleski wrote:

On Fri, 08 Oct 2004 12:57:43 -0700, Robin Dunn wrote:

It would be a good learning
experience. I'm thinking along the lines of prefacing the
existing examples as 'pre-2.5' and rewritten examples as
'2.5+', keeping both in the Wiki.

If the sample can be modified such that it works with both 2.4
and 2.5 without too much complexity then it would be nice to do
it that way insteead of having two samples. But I'll let
whoever does the editing decide which way to do it on a case-by-
case basis.

Well, I'm new to wxPython but looking at the simple example:
http://wiki.wxpython.org/index.cgi/Getting_20Started#head-
fb6ad9b86e3a9ec67d4501 336b69459fd6f2a3d4

There is a "from wxPython.wx import *"
Isn't that deprecated in 2.5+ to be "import wx"?

Yes, but 2.4.2.4 can also do "import wx"

Matthew Zaleski wrote:

Umm, should I move this discussion thread over to wxPython-docs?

That would be the "correct" place for it, but that list has been fairly dead for some time so you may get a better response here.

···

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