Do other Python GUI toolkits require this?

K

Kevin Walzer

From the introduction to PyObjC, the Python-Objective-C bridge on Mac OS X:

"As described in Objective-C for PyObjC users the creation of
Objective-C objects is a two-stage process. To initialize objects, first
call a class method to allocate the memory (typically alloc), and then
call an initializer (typically starts with init). Some classes have
class methods which perform this behind the scenes, especially classes
that create cached, immutable, or singleton instances."

An example:

myObject = NSObject.alloc().init()

I know Tkinter doesn't require any manual memory allocation of this
sort. Does wxPython, PyQt, PyGtk require anything like this when
creating objects?
 
J

James Stroud

Kevin said:
From the introduction to PyObjC, the Python-Objective-C bridge on Mac
OS X:

"As described in Objective-C for PyObjC users the creation of
Objective-C objects is a two-stage process. To initialize objects, first
call a class method to allocate the memory (typically alloc), and then
call an initializer (typically starts with init). Some classes have
class methods which perform this behind the scenes, especially classes
that create cached, immutable, or singleton instances."

An example:

myObject = NSObject.alloc().init()

I know Tkinter doesn't require any manual memory allocation of this
sort. Does wxPython, PyQt, PyGtk require anything like this when
creating objects?

This appears more or less unique to Objective C. It looks that with
PyObjC, you have to interact with the Objective C runtime to manage
memory. This is not required, thankfully, with any other GUI tookits
I've seen.

I think the main difference is that PyObjC is not a GUI toolkit per se,
but is simply a means to make the Objective C runtime (and hence Cocoa)
available via a python layer.

James
 
K

Kevin Walzer

James said:
This appears more or less unique to Objective C. It looks that with
PyObjC, you have to interact with the Objective C runtime to manage
memory. This is not required, thankfully, with any other GUI tookits
I've seen.

I think the main difference is that PyObjC is not a GUI toolkit per se,
but is simply a means to make the Objective C runtime (and hence Cocoa)
available via a python layer.

James

That's kind of what I thought. Memory management? In Python? *shudder*

I'm a Mac-only developer, and I keep telling myself I should drink the
Mac-only Kool-aid of PyObjC. But Tk is burned into my brain, and
anything else looks and feels weird to me. Tk is so flexible that it's
fairly easy to tweak it to look Mac-like, and it's simpler to do that
than learn a new tookit.
 
M

Michael Bentley

That's kind of what I thought. Memory management? In Python? *shudder*

I'm a Mac-only developer, and I keep telling myself I should drink the
Mac-only Kool-aid of PyObjC. But Tk is burned into my brain, and
anything else looks and feels weird to me. Tk is so flexible that it's
fairly easy to tweak it to look Mac-like, and it's simpler to do that
than learn a new tookit.

PyObjC is pretty slick (and since Ronald hasn't made any commits in a
while I'm nearly certain it'll show up in the next official
distribution of the devtools). About the time you gave up on PyQt on
the Mac and switched over to Tkinter, I switched to PyObjC. The
learning curve is rather steep IMO, but worth it. One thing I think
I should mention though is that if you move to PyObjC -- do some
projects in Objective C first. Otherwise your brain will implode.

hth,
Michael
 
A

Antoon Pardon

PyObjC is pretty slick (and since Ronald hasn't made any commits in a
while I'm nearly certain it'll show up in the next official
distribution of the devtools). About the time you gave up on PyQt on
the Mac and switched over to Tkinter, I switched to PyObjC. The
learning curve is rather steep IMO, but worth it.

Just a throw in remark, that you may ignore if you wish, but a steep
learning curve means that the subject is easily familiarized and that
the learning period is short.

You seem to use it as if it is the opposite.
 
M

Michael Bentley

Just a throw in remark, that you may ignore if you wish, but a steep
learning curve means that the subject is easily familiarized and that
the learning period is short.

You seem to use it as if it is the opposite.

Mathematical absurdities aside, it's the common usage -- but perhaps
you knew that.
 
A

Antoon Pardon

Mathematical absurdities aside, it's the common usage -- but perhaps
you knew that.

I don't know how you come to the conclusion that it is a mathematical
absurdity but consider this: If you find that common usage propagates
something that is incorrect, should we just shrug it off or should we
attemp a correction? There is always a chance that one day you find
yourself exposed to a learning curve while going through a document.
If you just depend on common usage you will probably draw the wrong
conclusion.
 
A

Antoon Pardon

Perhaps in Belgium they prefer climbing mountains over walking up and
down gentle hills? Or possibly they will simply pick any nit that is
carelessly left within range?

If it is just a nit, why don't you ignore my remark as I suggested?

Now suppose I give you a graph that shows you how different people
are making progress. Would you prefer the rather flat curves instead
of the steep curves because the latter gives you the idea of someone
having to conquer huge obstacles or would you choose the steep curve
because they show you someone is getting results fast?
 
S

Steve Holden

Antoon said:
If it is just a nit, why don't you ignore my remark as I suggested?
Because I suffer from the quixotic urge to help stamp out obsessive
compulsive behavior on c.l.py? This is self-defeating, of course, since
it makes me appear obsessive compulsive in my own right ...
Now suppose I give you a graph that shows you how different people
are making progress. Would you prefer the rather flat curves instead
of the steep curves because the latter gives you the idea of someone
having to conquer huge obstacles or would you choose the steep curve
because they show you someone is getting results fast?
Suppose I should you a hill you have to climb? Would you rather don
mountain boots and crampons to climb 3,000 feet up a vertical cliff or
would you rather amble up, say, Ben Lomond with the other tourists?

Clearly you have no wish to bow before common usage. be careful this
doesn't put you in a universe with only one inhabitant. We all have to
get along.

obsessive-compulsive-ly y'rs - steve
 
S

Sampson, David

I don't know how this whole things started,

But it is funny on both sides. And hilarious from the outside. It sounds
like university Banter really. And who can avoid getting their 2 cents
in. Honestly

And people say computers are all about science. You guys prove that we
are all as much tech geeks and semantic geeks.
From my own experiential education background, and currently trying to
learn python I would say my exposure to python as a scripting language
is a logical extension to my knowledge of DOS and BASH scripting so in
that respect I am on a shallow learning curve. That is little effort
(say 5 on the X axis) over a given time (say 10 y).

Now, my goal is to take what I had learn about VB6 over the last number
of months to modify a chunk of in-house software My learning curve was
steeper. That is I had the same amount of time (10 y) but I had to put
in some more effort, so a moderate curve using 10 X as my peak, or point
where I plateau.

However where I as a newbie am having a hard time is programming a GUI
and full application using python (hence why I saw the topic), and
understanding OOP. Therefore right now I feel as though I am on a steep
learning curve. So maybe 20 or 30 on the X and I still have the same
amount of time.

To further support this I took the first result of google (of course the
worlds most authoritative resource on randomness) and went to this BLOG
(worlds best phenomena of random and unsubstantiated opinions).
http://createwhatmattersmost.blogspot.com/2006/10/learning-curve-explain
ed.html

And found this

I guess I'm approaching the "knee" of the learning curve, that magical
transition point on the learning at which you begin to generate results
far out of proportion to time and energy expended.

This tells me my understanding is the common accepted one of X= Effort,
Y= time or productivity ... But really productivity is a function of
time.


C'mon now folks, if this is university banter the least I should see is
some referencing.

Thanks for demonstrating my own lack of will power and propensity to
engage in both of your OCB.

Now I must get back to my steep learning curve or else I will be back on
the street.

Cheers


-----Original Message-----
From: [email protected]
[mailto:p[email protected]] On Behalf
Of Steve Holden
Sent: April 19, 2007 08:25
To: (e-mail address removed)
Subject: Re: Do other Python GUI toolkits require this?

Antoon said:
If it is just a nit, why don't you ignore my remark as I suggested?
Because I suffer from the quixotic urge to help stamp out obsessive
compulsive behavior on c.l.py? This is self-defeating, of course, since
it makes me appear obsessive compulsive in my own right ...
Now suppose I give you a graph that shows you how different people are
making progress. Would you prefer the rather flat curves instead of
the steep curves because the latter gives you the idea of someone
having to conquer huge obstacles or would you choose the steep curve
because they show you someone is getting results fast?
Suppose I should you a hill you have to climb? Would you rather don
mountain boots and crampons to climb 3,000 feet up a vertical cliff or
would you rather amble up, say, Ben Lomond with the other tourists?

Clearly you have no wish to bow before common usage. be careful this
doesn't put you in a universe with only one inhabitant. We all have to
get along.

obsessive-compulsive-ly y'rs - steve
 
D

Dennis Lee Bieber

Just a throw in remark, that you may ignore if you wish, but a steep
learning curve means that the subject is easily familiarized and that
the learning period is short.

You seem to use it as if it is the opposite.

Common usage is that a "steep learning curve" means something that
is "difficult to climb".

This may not reflect what any scientific study plotting ease of
learning/experience would show, but is how "common folk" would describe
learning something -- that is, not by the /time/ needed to learn it, but
the apparent /effort/ needed to become even functional with it.

Python, itself, by this convention, had a low/shallow curve -- one
could begin producing programs without having to learn everything in the
library reference manual (heck, simple console mode programs could be
written using /just/ the core language structures). Most GUI systems,
OTOH, have a "steep" wall where one must absorb a lot of specific
concepts (how to bind call-backs to widgets, what the widgets even are,
etc.) before one can even produce a simple "hello world" button.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
W

Wayne Brehaut

I don't know how you come to the conclusion that it is a mathematical
absurdity but consider this: If you find that common usage propagates
something that is incorrect, should we just shrug it off or should we
attemp a correction? There is always a chance that one day you find
yourself exposed to a learning curve while going through a document.
If you just depend on common usage you will probably draw the wrong
conclusion.

The only way one could assume the "common usage" to be a mathematical
absurdity would be not to think about it or not to have much
mathematical insight or "maturity". Is a vertical cliff not steep no
matter how high it is? And is a gentle grade (say <= 10%) not
un-steep no matter how long it is? Is the slope of a curve dependent
on its length?

So the remark that " a steep learning curve means that the subject is
easily familiarized and that the learning period is short" is
completely incorrect on two points (i.e., all points that are
relevant): first, steep always implies much to learn in a relatively
short time (what else could the slope of a curve possibly mean
"mathematicallY" or logically?); second, steepness is independent of
length, so "steep" has no implication in general about how long the
learning curve will be--on the contrary, in fact, it's quite possible
that a learning curve will never have any great challenges (steep
portions) but be only a very long gradual process--as the learning of
many natural languages is.

A learning curve is conventionally the graph of a function of
"quantity to be learned" vs. time, and it may be steep or not and,
independently, may be long or not. And if it's long and complex
enough, it may have some portions that are steeper than others, and
some steep portions may be longer than others (and more or less
steeper than those they are steeper than).

A steep learning curve would imply there's a lot to learn in a short
time--at least at some point in learning the material, and usually
implied to be at the start--hence the slope is large (and the curve is
steep) for some significant portion of the learning process. A
non-steep learning curve would imply that at no time in the learning
process (or, at least, the period under consideration) is there a lot
to learn in a short time.

If there's little to learn about a language or package but all parts
are so interdependent that you need to learn all, or most, right at
the start, then the learning curve is steep but short.

Independent of steepness, a learning curve will be short if there is
not a lot to learn overall, and long if there _is_ a lot to learn.
True Basic has a short and non-steep learning curve, whereas BF has a
short and steep curve; and C++, in my opinion, has a steep and long
learning curve since you must learn a lot of C syntax and semantics as
well as general OO terminology and principles to get started, and
every time you think you're done there's yet another fix for a
previously unconsidered problem or to add yet another "feature".

More apropos, Perl probably has a steep and long learning curve,
whereas Python's is less steep overall (and especially at the start)
and perhaps not quite as long. Of course this brings up a third
difference: how much of what "needs to be learned" is actually useful
and how much is excess baggage caused by poor language design? The
area under the curve represents the amount of information _about that
particular topic_ that must be learned, and is not a measure of
knowledge or wisdom.

To learn enough to be able to peform many simple tasks, both Java and
Perl have much steeper learning curves than Python: Java requires
knowledge of at least some basic OOP terminology and Java syntax for
creating a class, and variable type declarations, to get started; Perl
requires learning special symbols for correct naming of different data
types and other syntax that can be "cryptic" to a beginner. A
beginning Java programmer or Perl programmer will not have learned
more useful information than a beginning Python programmer at this
point: one will have "learned more Java" and the other will have
"learned more Perl", but this only implies there's "more stuff" to
learn in these two than in Python before being competent at this
particular set of tasks. And this would imply that both Java and Perl
are less efficient in a fairly-well-defined way than Python to this
level of programmer competence.

There--that horse is dead!
 
S

sjdevnull

I don't know how you come to the conclusion that it is a mathematical
absurdity but consider this: If you find that common usage propagates
something that is incorrect, should we just shrug it off or should we
attemp a correction?

a) In English, "learning curve" is not restricted to a mathematical
plot--Webster's also defines it as "the course of progress made in
learning something". In that context, adding the adjective steep
("extremely or excessively high...STEEP implies such sharpness of
pitch that ascent or descent is very difficult") makes sense.

Trying to apply a mathematical definition to an English-language
phrase is prone to incorrect outcomes.

b) The purpose of language is to communicate. In English, if a phrase
now means something in common usage, then that is (one of) its current
definition(s)--this is possibly different from some other languages
where there is an attempt to have an "officially sanctioned" set of
definitions and spellings that may differ from common usage. If you
find that everyone else means something when they say a phrase, you'd
best learn what they mean if you want to be speaking the same language
(and hence be able to communicate with them).
 
N

Nigel Rowe

Just a throw in remark, that you may ignore if you wish, but a steep
learning curve means that the subject is easily familiarized and that
the learning period is short.

You seem to use it as if it is the opposite.

Who says the axes are labeled "familiarity" and "learning period"? I
just assume they are labeled (y-axis) "Effort" and (x-axis) "Knowledge"
(or "skill" or ....).

Which means that something with a 'steep learning curve' requires a lot
of effort to achieve a small amount of knowledge (or skill or ...).
 
H

Hendrik van Rooyen

Perhaps in Belgium they prefer climbing mountains over walking up and
down gentle hills?

Mountains ? Hills ? In Belgium ??

Its not called the battlefield of Europe for nothing...

- Hendrik
 
A

Antoon Pardon

Antoon said:
Michael Bentley wrote:
On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote:

[...] The
learning curve is rather steep IMO, but worth it.
Just a throw in remark, that you may ignore if you wish, but a steep
learning curve means that the subject is easily familiarized and that
the learning period is short.

You seem to use it as if it is the opposite.
Mathematical absurdities aside, it's the common usage -- but perhaps
you knew that.


Perhaps in Belgium they prefer climbing mountains over walking up and
down gentle hills? Or possibly they will simply pick any nit that is
carelessly left within range?

If it is just a nit, why don't you ignore my remark as I suggested?
Because I suffer from the quixotic urge to help stamp out obsessive
compulsive behavior on c.l.py? This is self-defeating, of course, since
it makes me appear obsessive compulsive in my own right ...
Now suppose I give you a graph that shows you how different people
are making progress. Would you prefer the rather flat curves instead
of the steep curves because the latter gives you the idea of someone
having to conquer huge obstacles or would you choose the steep curve
because they show you someone is getting results fast?
Suppose I should you a hill you have to climb? Would you rather don
mountain boots and crampons to climb 3,000 feet up a vertical cliff or
would you rather amble up, say, Ben Lomond with the other tourists?

So if you have the choice between a steep or a shalow income curve
you will prefer the shalow curve because a steep curve makes you
think about verticale clifs and such?

The analogy with a walk is just silly because curves are not like walks.
Nobody will say something like: I won't invest in that company because
it has a steep profit curve or the reverse: I'll invest in this company
because it has an easy looking downhill going profit curve.
Clearly you have no wish to bow before common usage. be careful this
doesn't put you in a universe with only one inhabitant. We all have to
get along.

Indeed I have no wish to bow before common usage. I prefer to think
about things and dare to speak out when they don't seem to make sense.

Just repeating common usage propagates a lot of nonsense.
 
A

Antoon Pardon

The only way one could assume the "common usage" to be a mathematical
absurdity would be not to think about it or not to have much
mathematical insight or "maturity". Is a vertical cliff not steep no
matter how high it is? And is a gentle grade (say <= 10%) not
un-steep no matter how long it is? Is the slope of a curve dependent
on its length?

So the remark that " a steep learning curve means that the subject is
easily familiarized and that the learning period is short" is
completely incorrect on two points (i.e., all points that are
relevant): first, steep always implies much to learn in a relatively
short time (what else could the slope of a curve possibly mean
"mathematicallY" or logically?);

No it doesn't imply that at all. A learning curve doesn't show some
goal of a person who was given just so much time to familiarize himself
with some material. A learning curve shows the progres that is made
in familiarizing one self while studying. A steep curve means a
lot of actual learning in a short time.
second, steepness is independent of
length, so "steep" has no implication in general about how long the
learning curve will be--on the contrary, in fact, it's quite possible
that a learning curve will never have any great challenges (steep
portions) but be only a very long gradual process--as the learning of
many natural languages is.

That doesn't contradict that if one language has a steeper curve to
learn than a second. Familiarisation with the first language will
be faster and easier than with the second.
A learning curve is conventionally the graph of a function of
"quantity to be learned" vs. time,

No it doesn't. A learning curve is the graph that somehow quantifies
what is actually learned vs time.
 
A

Antoon Pardon

a) In English, "learning curve" is not restricted to a mathematical
plot--Webster's also defines it as "the course of progress made in
learning something". In that context, adding the adjective steep
("extremely or excessively high...STEEP implies such sharpness of
pitch that ascent or descent is very difficult") makes sense.

How much sense does it really make? Suppose we would talk about
an income curve. Would you not prefer a steep curve over a shalow
one? What about a productivity curve? It is all about the progress
made in something.

So how much sense does it make that a steep curve in earnings and
productivity is good but a steep curve in learning is bad?
Trying to apply a mathematical definition to an English-language
phrase is prone to incorrect outcomes.

b) The purpose of language is to communicate. In English, if a phrase
now means something in common usage, then that is (one of) its current
definition(s)--this is possibly different from some other languages
where there is an attempt to have an "officially sanctioned" set of
definitions and spellings that may differ from common usage. If you
find that everyone else means something when they say a phrase, you'd
best learn what they mean if you want to be speaking the same language
(and hence be able to communicate with them).

But the problem is that even if this would be only a way to communicate
in englishi, a lot of people get the wrong idea about real curves from
this idiom, as this thread shows. So even if you only want to communicate
one specific idea that comes accross as intended, you also propagate
a lot of nonsense with it.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top