473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

wxpython book

I have seen some brief mention of the new book by Robin Dunn in one or
two posts. But none that highlight that the book is to be published
sometime at then end of Jan 2006.

I hope that turns out to be an accurate date.

It has been long-awaited so I thought it ought to get a proper mention.

I must admit that I've been waiting a long time for some solid
documentation that is up to date with the current release of wxwidgets.

I hope this list will be the right one to post to since there are
always posts about what gui tool to use.

The link is

http://www.manning.com

The front page of the site has a brief outline of the book. What would
be good is if it had a list of contents so we could be clearer as to
what subjects were covered and in what depth.

I can't thank Robin and his colleague enough for the effort to produce
the book. So I hope it proves very popular.

John Aherne

Dec 11 '05 #1
4 1345
Here's a more direct link:
http://www.manning.com/books/rappin
Dec 12 '05 #2
Which one is better w.r.t. memory allocation but also w.r.t. speed:

## 1.1 ##

def forloop(a,b):

for idx in range(a,b):
## ..
## do something
## ..

## 1.2 ##

def whileloop(a,b):

idx = a
while idx < b:
## ..
## do something
## ..
idx += 1

#########

I mean what I really would like is to have something C++ - like "for
(int idx = a; idx < b; i++) { .. }" where no internal vector or
something like that is allocated but only a few op's on registers are
performed; in the whileloop in python the picture is roughly the same
behind the scenes I guess.. but what about in the forloop? Is python
smart enough not to generate an internal vector as it does usually for
lists or do I have to apply some modifications (xrange..)? What happens
further if I do the following:

## 2.1 ##

def forloop(a,b,lst):

for idx in lst.sort():
## ..
## do something
## ..

#######

Is the sorting function called in every iteration just to detect that
(after the first sorting) it is useless comming back to the loop or does
this happen:

## 2.2 ##

def forloop(a,b,lst):

lst.sort()
for idx in lst:
## ..
## do something
## ..

#######
Feb 26 '06 #3
I mean what I really would like is to have something C++ - like "for
(int idx = a; idx < b; i++) { .. }" where no internal vector or
something like that is allocated but only a few op's on registers are
performed; in the whileloop in python the picture is roughly the same
Use xrange instead - as it is customary for at least python2.1, if not even earlier.

behind the scenes I guess.. but what about in the forloop? Is python
smart enough not to generate an internal vector as it does usually for
lists or do I have to apply some modifications (xrange..)? What happens
further if I do the following:

## 2.1 ##

def forloop(a,b,lst):

for idx in lst.sort():
## ..
## do something
## ..

#######

Is the sorting function called in every iteration just to detect that
(after the first sorting) it is useless comming back to the loop or does
this happen:

## 2.2 ##

def forloop(a,b,lst):

lst.sort()
for idx in lst:
## ..
## do something
## ..

#######


The iterable-expression of a for _ in _: is always only evaluated once.

Diez
Feb 26 '06 #4
invitro81 wrote:
Which one is better w.r.t. memory allocation but also w.r.t. speed:
## 1.1 ##
def forloop(a,b):
for idx in range(a,b):
... Above preferred to next (for readability) using xrange may help speed
depending.
## 1.2 ##
def whileloop(a,b):
idx = a
while idx < b:
...
idx += 1 def forloop(a,b,lst):
for idx in lst.sort():
...

This one just doesn't work. the sort method on a list causes a
side-effect of sorting the list, and then returns None to remind you.

def forloop(a,b,lst):
lst = list(lst) # if you don't want to mangle the original)
lst.sort()
for idx in lst:
...

With the new-fangled (2.4 or greater) Python, you could use sorted:
def forloop(a,b,lst):
for idx in sorted(lst):
...

Your other questions were correctly answered elsewhere
--Scott David Daniels
sc***********@acm.org
Feb 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: mike420 | last post by:
Tayss wrote: > > app = wxPySimpleApp() > frame = MainWindow(None, -1, "A window") > frame.Show(True) > app.MainLoop() > Why do you need a macro for that? Why don't you just write
2
by: Axium Computer Services | last post by:
I just recently started trying to teach myself python and wxPython. The python portion of that hasn't been much of a problem as documentation seems available and of good quality. While I was...
7
by: SeeBelow | last post by:
Do many people think that wxPython should replace Tkinter? Is this likely to happen? I ask because I have just started learning Tkinter, and I wonder if I should abandon it in favor of...
15
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems...
9
by: David Sulc | last post by:
Hi ! I've looked all over (internet, books, etc.) and I haven't found a very good ressource to get started with wxPython (yes, I've been through their tutorial). What I would basically like...
5
by: Butternut squash | last post by:
any recommendations? any opinions? I want to learn to program in python and need a gui reference. I'll be updating various mysql tables. I have most of the code ready to roll by using a command...
4
by: Jive Dadson | last post by:
I hope someone can help me with a couple of wxPython questions, or point me to the right newsgroup for the questions. I am trying to modify the floatcanvas demo program. I want to load an image...
12
by: Matt Bitten | last post by:
I've got a wxPython program that needs to do some drawing on a DC on a regular basis, whether or not a paint event happens. I know how to make a ClientDC to do the drawing in, and I know what...
3
by: Gandalf | last post by:
I try to reach a specific wx StaticText element's text and to change it by clicking on a button now let's say the this is my element: wx.StaticText(panel, 15, "Hello" ,(30, 70) ,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.