Re: Free software versus software idea patents

2011-04-13 Thread geremy condra
On Wed, Apr 13, 2011 at 10:50 PM, harrismh777  wrote:
> Westley Martínez wrote:
>
>  I don't  even know one person who has Win7 installed, running, and
> likes it...
> >  >>  not even one.

 >  >
 >  >  Hi, m harris, nice to meet you.  Now you do.
 >  >
 >  >  To the online community:  Is there a name for trolling for A by
 >  >  advocating for not-A in a way that discredits your point of view
 > an
 >  >  case so that A now seems much more reasonable?  It's not really
 >  >  "concern trolling".  What would this be called?
>>>
>>> >
>>> >  Harrisment.
>>> >
>>> >  /I'm sorry, this is abuse...
>>> >
>>> >  Geremy Condra
>>
>> That was harristerical.
>>
>
>
> Actually, it is funny... and I love humor as much as I love mathematics,
> software, and freedom. Truly harristerical...    :)
>
> But on a serious note, I did wonder who would be the first jouster to offer
> the argumentum ad hominem? ... ah, sticks and stones...
>
> My major professor once told me, "You know you've won the argument when they
> start calling you names!"

I think your professor should have said "you know you've won the
argument when you can prove it".

Geremy Condra
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Free software versus software idea patents

2011-04-13 Thread geremy condra
On Wed, Apr 13, 2011 at 10:35 PM, harrismh777  wrote:

>    I am sorry, I was not clear and you rightly misunderstood my indirection.
> I am not claiming that software describes hardware. Please allow me to
> restate.
>    Mathematics describes hardware, yet hardware is patentable and
> mathematics is not. The hardware is patentable, but the mathematics used in
> the hardware production is not. ( I think we are in agreement so far).
> Again, patent the chip, but not the symbol.

I think you're still ascribing slightly too much power to mathematics
here, but I don't think its relevant to the main point you're making.

>    All software (and yes, I mean all of it) is nothing more nor less than
> mathematics... relationship over symbol--- but not limited to algorithms,
> and certainly not limited to computation.

Restatement is not a form of proof. If you're right, prove it to me-
I've stated my initial objections.

> Software is not *just* described
> by mathematics (as hardware is) software is itself mathematics--- the
> description. (not the description of hardware, the living and breathing
> description of relationship over symbol).  Software is mathematics, and it
> is therefore not patentable. Please don't confuse hardware with this... I
> never meant to go there--- my fault.   The mathematics of software is no
> more physical than the mathematics of (chalk on a blackboard) is physical.
> The chalk dust and board are not the issue; neither are the circuits and
> switches. Relationship over symbol is the issue; and algorithms and
> computation are the very least of it, if at all. Think "thought" and
> "process".

This is just repetition. Besides being a marginally effective attempt
to bedazzle with eloquence, it again contributes nothing to your
argument.

>    When I am speaking of mathematics I am NOT even speaking about
> computation, nor am I speaking about *just* algorithms; although,
> mathematical 'process' is certainly at the heart of the discussion.

>    Richard Feynman has said, "Nature talks to us in the language of
> mathematics," and it behooves all educated people to grapple with the
> understanding of this powerful aphorism. When authors of software are
> composing software, they are "doing" mathematics. The craft is ever present.
> Some, like myself more theoretical and philosophical, others more practical
> and applied. Yet both kinds of person are doing mathematics (generating
> mathematics) with every manipulated symbol. The beautiful symbols of
> software development are the very symbols of harmonious mathematical
> relationship from every pure functional construct (or even OOP Class) right
> down to each and every 1 & 0 (on and off). This artistry is pure and applied
> science (the stuff of every human thought in logic and reasoning).Jan
> Gullberg has said, "Mathematics grows and develops in many ways unrelated to
> science, and thus plays a crucial role in the history of human thought".
> This is the art and science of software engineering of which I am speaking.
> Software is the very stuff of human thought and expression. In so many ways
> software reflects the very nature of what it means to be human; how we
> reflect, organize, structure, and relate cognitively over symbol. I love
> mathematics, as I love software, and I have abused neither.

Again, repetition. You've found the fire and wonder but lost the
precision in the process, and that *is* an abuse of mathematics. Give
it precision and you'll do just fine.

>    If you agree with my politics (with broad strokes) why would you not like
> to try to understand what my politics are based in? Are you apposed to
> software patents out of frustration and emotion only? Or, is there another
> in-born reason why you detest them? I suspect that the mathematician in you
> is screaming to be let out...

It's been let out. I'm a security researcher and a cryptanalyst, and I
have colleagues who do the same work I do who identify themselves as
mathematicians. My opposition to software patents is based in the
firmly held belief that they're a way for entrenched players to kick
the crap out of real innovators. I believe that to be profoundly
unfair, and I don't have a great love of bullies.

Having said that, I have a greater respect for mathematics than I do
for my own economic views, and I don't like seeing it become a
political football. If you can prove something, *prove it*. If you
cannot- no matter how close you might feel you are- don't claim that
math says you're right. In this case you've let yourself get carried
away with some very deep, very complex math that you don't fully
understand and used it to justify a view that almost is almost
certainly held for other reasons. You've reduced some of the most
elegant and powerful works of the human mind to simple confirmation
bias, and I think most mathematicians would find that shameful.

Geremy Condra
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Free software versus software idea patents

2011-04-13 Thread harrismh777

Ian Kelly wrote:

There is at least one method of measuring it without resorting to
sales figures: logging user-agent data from web browsers.  Is it
perfectly accurate?  Of course not.  But there are a number of
different organizations that do this, sampling hundreds of thousands
of different websites, and they consistently report that the various
versions of Windows have a total usage share ranging from 80% to 90%.


True enough.

How many web crawlers have you built? Are there any web programmers 
out there who need a web bot to hit multiple sites zillions of times a 
month from different places on earth to 'up' the number of hits for 
economic reasons? I've seen my share of this.


How mamy times have you altered the identity of your web browser so 
that the web site would 'work'? You know, stupid messages from the 
server that say, "We only support IE 6+, upgrade your browser...",  so 
you tell it you're using IE 6 and, well no problem.


Web site data is bogus. It assumes even distributions... it assumes 
even usage of the site from all surfers, it assumes no web crawlers and 
no bots, it assumes no browser identity tampering, and it assumes that 
there aren't those who for economic reasons are not inflating the 
numbers deliberately (no, really??) from world-owned bot farms.


There is no reliable way to measure free software usage. But, there 
sure is a lot of posturing going on in the market place ...  wonder why?



kind regards,
m harris


--
http://mail.python.org/mailman/listinfo/python-list


Re: Free software versus software idea patents

2011-04-13 Thread harrismh777

Westley Martínez wrote:

  I don't  even know one person who has Win7 installed, running, and likes it...
>  >>  not even one.

>  >
>  >  Hi, m harris, nice to meet you.  Now you do.
>  >
>  >  To the online community:  Is there a name for trolling for A by
>  >  advocating for not-A in a way that discredits your point of view an
>  >  case so that A now seems much more reasonable?  It's not really
>  >  "concern trolling".  What would this be called?

>
>  Harrisment.
>
>  /I'm sorry, this is abuse...
>
>  Geremy Condra

That was harristerical.




Actually, it is funny... and I love humor as much as I love mathematics, 
software, and freedom. Truly harristerical...:)


But on a serious note, I did wonder who would be the first jouster to 
offer the argumentum ad hominem? ... ah, sticks and stones...


My major professor once told me, "You know you've won the argument when 
they start calling you names!"



kind regards,
m harris


--
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Free software versus software idea patents

2011-04-13 Thread harrismh777

geremy condra wrote:

I'm familiar with the case, and agree with Knuth (and you) that math
should not be patentable. I'd also agree that algorithms are
mathematics. Critically, algorithms*are not*  software.



 it isn't clear to me that software and
 computation are synonymous. Lambda calculus only models computation,
 and software has real properties in implementation that are strictly
 dependent on the physical world



In your rush to misunderstand this you haven't addressed it yet.



I am sorry, I was not clear and you rightly misunderstood my 
indirection. I am not claiming that software describes hardware. Please 
allow me to restate.
Mathematics describes hardware, yet hardware is patentable and 
mathematics is not. The hardware is patentable, but the mathematics used 
in the hardware production is not. ( I think we are in agreement so 
far). Again, patent the chip, but not the symbol.
All software (and yes, I mean all of it) is nothing more nor less 
than mathematics... relationship over symbol--- but not limited to 
algorithms, and certainly not limited to computation. Software is not 
*just* described by mathematics (as hardware is) software is itself 
mathematics--- the description. (not the description of hardware, the 
living and breathing description of relationship over symbol).  Software 
is mathematics, and it is therefore not patentable. Please don't confuse 
hardware with this... I never meant to go there--- my fault.   The 
mathematics of software is no more physical than the mathematics of 
(chalk on a blackboard) is physical. The chalk dust and board are not 
the issue; neither are the circuits and switches. Relationship over 
symbol is the issue; and algorithms and computation are the very least 
of it, if at all. Think "thought" and "process".


When I am speaking of mathematics I am NOT even speaking about 
computation, nor am I speaking about *just* algorithms; although, 
mathematical 'process' is certainly at the heart of the discussion.


Richard Feynman has said, "Nature talks to us in the language of 
mathematics," and it behooves all educated people to grapple with the 
understanding of this powerful aphorism. When authors of software are 
composing software, they are "doing" mathematics. The craft is ever 
present. Some, like myself more theoretical and philosophical, others 
more practical and applied. Yet both kinds of person are doing 
mathematics (generating mathematics) with every manipulated symbol. The 
beautiful symbols of software development are the very symbols of 
harmonious mathematical relationship from every pure functional 
construct (or even OOP Class) right down to each and every 1 & 0 (on and 
off). This artistry is pure and applied science (the stuff of every 
human thought in logic and reasoning).Jan Gullberg has said, 
"Mathematics grows and develops in many ways unrelated to science, and 
thus plays a crucial role in the history of human thought". This is the 
art and science of software engineering of which I am speaking. Software 
is the very stuff of human thought and expression. In so many ways 
software reflects the very nature of what it means to be human; how we 
reflect, organize, structure, and relate cognitively over symbol. I love 
mathematics, as I love software, and I have abused neither.


If you agree with my politics (with broad strokes) why would you 
not like to try to understand what my politics are based in? Are you 
apposed to software patents out of frustration and emotion only? Or, is 
there another in-born reason why you detest them? I suspect that the 
mathematician in you is screaming to be let out...


kind regards,
m harris



--
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Terry Reedy

On 4/13/2011 11:12 PM, Steven D'Aprano wrote:


Personally, I'm glad that most of Python Dev don't hang around here. We
are far better off if Python Dev, you know, actually Devs Python, rather
than answering (mostly) easy questions and getting stuck in tar-pits.


Since 3.2 was released 45 days ago, the active devs have been busy. 
Misc/News in the repository has about about 170 entries for 3.3. At 
least 80% of the changes were also made to 3.1 and 3.2, and most of 
those to 2.7 also. There were perhaps another 10 just for 2.7. So there 
are about 180 unique changes for an average of 4 per day. I suspect the 
average time for each is at least an hour.


When I get up to speed with hg and start contributing again, I will 
spend less time here.


--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 3:08 PM, John Ladasky  wrote:
> I may regret wading into a flame-war, but...

As long as we leave it at that! :)

> I got started with Python in 2002.  I took one look at TKinter, said
> "yuck!", and went searching for something else.  Now, wxPython is a
> bit clunky for a Python programmer because of its strong ties to C++
> -- but that's what I chose, and it has served me well.  I would like
> to see wxPython become the default GUI for our very fine programming
> language.

That's fine and that's your choice. I however don't feel
that "we" (as a community) or they (the python developers)
should make any GUI toolkit the default for Python (let
alone any programming language).

IHMO GUI toolkits are not a feature of the language but
rather a tool (or library) which is compatible in some way
with your language.

Python is a fine language.

So what if some of the code written _in Python_
(libraires, tools, frameworks, whatever) are a bit
poorly written, documented, or are lacking in features ?

Is this Python's fault ? Should it be ? I don't think so.

This is probably the reason for different groups in the first
place (python-dev, python-core-mentoring, python-ideas, etc)
so that there is a clear separation of "what's what".

Can we stop arguing about this now ?

cheers
James



> http://mail.python.org/mailman/listinfo/python-list
>

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread John Ladasky
I may regret wading into a flame-war, but...

I got started with Python in 2002.  I took one look at TKinter, said
"yuck!", and went searching for something else.  Now, wxPython is a
bit clunky for a Python programmer because of its strong ties to C++
-- but that's what I chose, and it has served me well.  I would like
to see wxPython become the default GUI for our very fine programming
language.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread alex23
rantingrick  wrote:
> We all have jobs James, and we still find the time to help others out
> on the list.

I don't think "we" has quite the meaning you believe it does. Or
"help" for that matter.

> Guido is the head of a community. A community that,
> remember, *he* started! He built this whole thing from nothing. And
> luck was on his side because Python became one of the great
> languages.

And over the past few years he's been working on Google App Engine,
that lets _anyone_ run their own Python code on the web using aspects
of Google's backend.

Please point out your contributions to the Python community over that
time frame. Note that rants and long threads do not constitute
"contributions".

> Q: Do you think he would be working at Google had it not been for
> Python's great success? Google does not just hire "any old CS major"
> you know!

According to your previous comment, Google hired him because he was
"lucky".

> But at some point something happened to Guido.

My guess is he got tired of listening to crap like this: "I think he
has evolved into a complete jerk".

The absolute hypocrisy of you accusing _anyone_ else of being ego-
driven is probably the most disgustingly reprehensible thing you've
said to date, out of what is an amazing litany of arrogant crap.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Littlefield, Tyler

>We all have jobs James, and we still find the time to help others out
Whose we? Can you point me to a thread within the last 6 months where 
you actually -helped- someone?

>I think he has evolved into a complete jerk (if you ask me)
1) We didn't ask you.
2) If he's been under this rock of his and won't come out to "rub 
shoulders with the little people, as you say," how do you know he's a jerk?

>but most importantly, learn to laugh at yourself.
we all laugh at you, even if you don't, so no worries.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread rantingrick
On Apr 13, 10:43 pm, James Mills  wrote:
> On Thu, Apr 14, 2011 at 1:26 PM, rantingrick  wrote:
> > And who pissed in Guido's punch bowl anyway? Why is he such an elitist
> > now? Why can he not come over once and a while and rub shoulders with
> > the little people? He does not have to hang out every day, just drop
> > in once a week or month at least.
>
> Because he has better things to do ?
> LIke his job at Google ?

We all have jobs James, and we still find the time to help others out
on the list. Guido is the head of a community. A community that,
remember, *he* started! He built this whole thing from nothing. And
luck was on his side because Python became one of the great
languages.

He will be responsible for this community and language as long as he
lives. Yes, that is a very tough road, but he alone choose this road
and he alone reaps the benefits.

Q: Do you think he would be working at Google had it not been for
Python's great success? Google does not just hire "any old CS major"
you know!

But at some point something happened to Guido. Somehow either the
power or the people got to him and seem to have destroyed his
benevolent nature. He gave into the dark-side and crossed a line that
is very hard to uncross.

If he is going to call himself a "benevolent" dictator then for Pete's
sake start acting like one! I understand that he is older and grumpier
now. And likewise I understand the drive to be a part of this
community may be slipping because of old age.

However.

If he is wants to call it quits then come out and say so. Or at least
change his name to "grumpy old dictator" so we will know who and what
we are dealing with. I think he has evolved into a complete jerk (if
you ask me) and i wish he would see the error of his ways.

Just for example: I have talked with Mats on c.l.ruby and i was
unknown to the group. I think it was maybe my fifth or so post on the
mailing list. That was so amazing to have Mats reply to my post! I
have even said some very rotten things about Ruby and STILL he replied
to my idea. It shows that Mats really cares about Ruby and about
anyone who uses his language. He never lets personal disagreements get
in the way of innovation. This kind of involvement by a creator
fosters innovation.

We must never hold grudges so passionately that we refuse to entertain
an idea because it came from the person who you had a previous
disagreement with. A community cannot survive in a shark tank like
this; everyone refusing to trust one another. No! Grow up and grow a
thicker skin. Learn to laugh at others, but most importantly, learn to
laugh at yourself.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread rantingrick
On Apr 13, 10:12 pm, Steven D'Aprano  wrote:

> Personally, I'm glad that most of Python Dev don't hang around here. We
> are far better off if Python Dev, you know, actually Devs Python, rather
> than answering (mostly) easy questions and getting stuck in tar-pits.

Nothing wrong with mediating out the work load to proper workers. Yes
the top tier should not be answering remedial questions however that
does not mean they should be removed from the sight of the greater
community. That also does not mean we should have class warfare.

Also stepping in tar-pits is avoidable if one exercises a bit of self-
restraint. And besides, one man's tar-pit is another's combustible
fuel oil for change.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 1:26 PM, rantingrick  wrote:
> And who pissed in Guido's punch bowl anyway? Why is he such an elitist
> now? Why can he not come over once and a while and rub shoulders with
> the little people? He does not have to hang out every day, just drop
> in once a week or month at least.

Because he has better things to do ?
LIke his job at Google ?

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Nested inner classes and inheritance -> namespace problem

2011-04-13 Thread Larry Hastings


On 04/13/2011 07:37 PM, Eric Snow wrote:

I suppose you could try something like this:

class Outer:
  global Inner
  class Inner:
class Worker:
  pass

  class InnerSubclass(Inner):
class Worker(Inner.Worker):
  pass

However, that pollutes your global namespace.  If you are worried 
about that you could try: [...]


It also means that Inner is not actually /in/ Outer, and the whole point 
was to have the class accessed as Outer.Inner.  But I can get what I 
wanted, if immediately after the definition of Outer I have:


   Outer.Inner = Inner
   del Inner


Thanks for the suggestion of "global Inner"!  That makes this approach 
palatable.



/larry/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread Nathan Coulson
On Wed, Apr 13, 2011 at 7:53 PM, David Cournapeau  wrote:
> On Thu, Apr 14, 2011 at 11:28 AM, Nathan Coulson  wrote:
>
>> actually figured out a neat trick,  mingw-w64 can link directly to the .dll.
>> gcc file.c python31.dll -o file.exe
>>
>> no .a needed.
>>
>> http://www.mingw.org/wiki/sampleDLL
>>
>> (have yet to find out if it actually works yet, but so far looks promising)
>
> Note the "If this method works for your application then there is
> usually no need for an import library.". Whether it works or not is
> often found the hard way (i.e. you won't have a linking error, but
> subtle bugs). Building a .a library is more stable in my experience
> (even in 32 bits).
>
> In any case, note the  -DMS_WIN64 which is mandatory if you want to
> make it work (without this define, mingw will use the python headers
> for 32 bits, with pointers typedef defined for 32 bits pointers
> instead of 64 bits, which will not work very well :) ).
>
> cheers,
>
> David

very good note,  had no clue.



-- 
Nathan Coulson (conathan)
--
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread rantingrick
On Apr 13, 10:01 pm, Ryan Kelly  wrote:
> On Wed, 2011-04-13 at 19:10 -0700, rantingrick wrote:
> > On Apr 13, 8:29 pm, Ryan Kelly  wrote:
> > > On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote:
[...]

> Funny you should bring that up.  The folks on python-dev are currently
> making a substantial push to increase involvement in python core
> development through the "Python Mentors" program.
>
> Site here:

[...]

> So anyone following along this thread, if you're interested in making a
> genuine contribution to python as a language, this is a great time and
> place to start.

That was a very helpful post Ian, thank you!

However i have a sneaking suspicion that if i join this group i will
be denied as was the case with other python groups. However the
question remains. Why do we need yet another group? Why can we not use
the comp.lang.python that everyone knows already. Since this is a
group created for noobs, how do you expect them to find out about it?
I have been hanging around for over four years and i did not know
until now. Go figure. The first place people are going to go for
online help is
comp.lang.X for whatever language they are learning.

And who pissed in Guido's punch bowl anyway? Why is he such an elitist
now? Why can he not come over once and a while and rub shoulders with
the little people? He does not have to hang out every day, just drop
in once a week or month at least.

I guess i am just old fashioned but i though "benevolent" was a
*positive* moniker. We need to know what kind of leader we are dealing
with here. We deserve that much. And if he is really "benevolent" then
*I* will apologize to both him and the community at whole. Until then
i wait...



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Thu, 2011-04-14 at 03:12 +, Steven D'Aprano wrote:
> On Thu, 14 Apr 2011 12:03:15 +1000, Ryan Kelly wrote:
> 
> > On Thu, 2011-04-14 at 11:46 +1000, Chris Angelico wrote:
> >> On Thu, Apr 14, 2011 at 11:29 AM, Ryan Kelly  wrote:
> >> > I weep that your delightful rhetoric is limited to this neglected
> >> > forum, where the guardians of python core deign not to tread, and
> >> > hence denied its rightful place exalted among python's canonical
> >> > lore.
> >> 
> >> Wait... so where do the Python experts hang out?
> > 
> > Don't panic, there are plenty of experts here :-)
> > 
> > It's an oft-cited troll complaint that many python big-wigs (Guido,
> > Raymond H, et al) don't subscribe to python-list.
> 
> Raymond Hettinger frequently posts here, both with interesting code 
> snippets and recipes, and to answer questions.

True.  Sorry Raymond.  You just happened to be the second name that
popped into my head in the "python big-wig" category.

> Personally, I'm glad that most of Python Dev don't hang around here. We 
> are far better off if Python Dev, you know, actually Devs Python, rather 
> than answering (mostly) easy questions and getting stuck in tar-pits.

For the record, I have no personal complaint about anyone's lack of
involvement on python-list.  Just reporting on the perceived state of
affairs.


  Cheers,

 Ryan



-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
r...@rfk.id.au|  http://www.rfk.id.au/ramblings/gpg/ for details



signature.asc
Description: This is a digitally signed message part
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: automated pep8 reformatter ?

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 1:06 PM, Ben Finney  wrote:
> Most of those don't have sensible automated responses. There aren't good
> automatic answers to “where should this line of code be broken to fit
> within 80 columns?” or “where should this end-line comment go instead?”.

And of course you are quite right. But it doesn't hurt to ask :)

> If you come up with algorithmic answers to all the above problems, yes,
> you could write such a tool. But I doubt it would be generally
> applicable; and consequently, I doubt that a generally-applicable tool
> already exists that fits your tastes.

I doubt such a tool could be written either.

The vim plugin I referenced earlier works nicely enough.

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Steven D'Aprano
On Thu, 14 Apr 2011 12:03:15 +1000, Ryan Kelly wrote:

> On Thu, 2011-04-14 at 11:46 +1000, Chris Angelico wrote:
>> On Thu, Apr 14, 2011 at 11:29 AM, Ryan Kelly  wrote:
>> > I weep that your delightful rhetoric is limited to this neglected
>> > forum, where the guardians of python core deign not to tread, and
>> > hence denied its rightful place exalted among python's canonical
>> > lore.
>> 
>> Wait... so where do the Python experts hang out?
> 
> Don't panic, there are plenty of experts here :-)
> 
> It's an oft-cited troll complaint that many python big-wigs (Guido,
> Raymond H, et al) don't subscribe to python-list.

Raymond Hettinger frequently posts here, both with interesting code 
snippets and recipes, and to answer questions. Particularly if they 
relate to itertools or other code he has contributed. Also Mark Dickson, 
and probably a few others.

Personally, I'm glad that most of Python Dev don't hang around here. We 
are far better off if Python Dev, you know, actually Devs Python, rather 
than answering (mostly) easy questions and getting stuck in tar-pits.




-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: automated pep8 reformatter ?

2011-04-13 Thread Ben Finney
James Mills  writes:

> What I really want is to fix up common "poor" (IHMO) coding styles
> in code that I have to maintain/review/etc. Things like:
> * Lines longer than 80 characters
> * Comments tacked on to the end of statements/expressions
> * Use of ' vs. "
> * More liberal use of Whitespace

Most of those don't have sensible automated responses. There aren't good
automatic answers to “where should this line of code be broken to fit
within 80 columns?” or “where should this end-line comment go instead?”.

> Why ? Simple. Being vision impaired (in fact legally blind of <1%
> sight) I find it hard to read and maintain code that exhibits poor
> coding style (especially the above). -- It is of course very personal
> and very subjective. (But hey maybe I should write a tool anyway!)

If you come up with algorithmic answers to all the above problems, yes,
you could write such a tool. But I doubt it would be generally
applicable; and consequently, I doubt that a generally-applicable tool
already exists that fits your tastes.

-- 
 \  “I tell you the truth: some standing here will not taste death |
  `\before they see the Son of Man coming in his kingdom.” —Jesus, |
_o__) c. 30 CE, as quoted in Matthew 16:28 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Wed, 2011-04-13 at 19:10 -0700, rantingrick wrote:
> On Apr 13, 8:29 pm, Ryan Kelly  wrote:
> > On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote:
> 
> I would LOVE to improve the doc, however first the student THEN the
> teacher. However in this forsaken land the "teachers" do not exist. We
> are cast off from the elites and left to wither, wandering in dark
> catacombs of source code with many doors but no keys to unlock them.
>
>  [..snip..]
>
> The "elites" have hidden themselves behind an
> impenetrable wall called python-dev. They wish not to speak with the
> peasants.

Funny you should bring that up.  The folks on python-dev are currently
making a substantial push to increase involvement in python core
development through the "Python Mentors" program.

Site here:

http://pythonmentors.com/


To quote from the site:

"""
The mission of the Python Core Mentor Program is to provide an open and
welcoming place to connect students, programmers – and anyone interested
in contributing to the Python Core development. This project is based on
the idea that the best way to welcome new people into any project is a
venue which connects them to a variety of mentors who can assist in
guiding them through the contribution process, including discussions on
lists such as python-dev, and python-ideas, the bug tracker, mercurial
questions, code reviews, etc.
"""

So anyone following along this thread, if you're interested in making a
genuine contribution to python as a language, this is a great time and
place to start.


  Ryan



-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
r...@rfk.id.au|  http://www.rfk.id.au/ramblings/gpg/ for details



signature.asc
Description: This is a digitally signed message part
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread David Cournapeau
On Thu, Apr 14, 2011 at 11:28 AM, Nathan Coulson  wrote:

> actually figured out a neat trick,  mingw-w64 can link directly to the .dll.
> gcc file.c python31.dll -o file.exe
>
> no .a needed.
>
> http://www.mingw.org/wiki/sampleDLL
>
> (have yet to find out if it actually works yet, but so far looks promising)

Note the "If this method works for your application then there is
usually no need for an import library.". Whether it works or not is
often found the hard way (i.e. you won't have a linking error, but
subtle bugs). Building a .a library is more stable in my experience
(even in 32 bits).

In any case, note the  -DMS_WIN64 which is mandatory if you want to
make it work (without this define, mingw will use the python headers
for 32 bits, with pointers typedef defined for 32 bits pointers
instead of 64 bits, which will not work very well :) ).

cheers,

David
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Nested inner classes and inheritance -> namespace problem

2011-04-13 Thread Eric Snow
On Wed, Apr 13, 2011 at 3:12 AM, Larry Hastings  wrote:

>
> The problem: if you're currently in a nested class, you can't look up
> variables in the outer "class scope".
>
> For example, this code fails in Python 3:
>
> class Outer:
>   class Inner:
> class Worker:
>   pass
>
>   class InnerSubclass(Inner):
> class Worker(Inner.Worker):
>   pass
>
> It fails at the definition of Worker inside InnerSubclass.  Python 3 can't
> find "Inner", in order to get to "Inner.Worker".
>
> Adding "global Inner" just above that line doesn't help--it's not a global.
> Adding "nonlocal Inner" just above that line doesn't help either--I suppose
> it's the *wrong kind* of nonlocal.  nonlocal is for nested functions, and
> this uses nested classes.
>
> You can tell me YAGNI, but I tripped over this because I wanted it.  It's
> not a contrived example.  I actually use inner classes a lot; I suppose I'm
> relatively alone in doing so.
>
> Yes, I could make the problem go away if I didn't have nested inner classes
> like this.  But I like this structure.  Any idea how I can make it work
> while preserving the nesting and inheritance?
>


Hi Larry,

My understanding is that the problem revolves around how classes are built.
 The body of the inner class has access to itself and to the globals, and to
whatever locals may be around (if defined inside a function).  So if you
want to see something, you have to put it in one of those.  I suppose you
could try something like this:

class Outer:
  global Inner
  class Inner:
class Worker:
  pass

  class InnerSubclass(Inner):
class Worker(Inner.Worker):
  pass

However, that pollutes your global namespace.  If you are worried about that
you could try:

def namespaces():
Inner  = None
class Outer:
  nonlocal Inner
  class Inner:
class Worker:
  pass
  class InnerSubclass(Inner):
class Worker(Inner.Worker):
  pass
return Outer

However, this freaks out because Inner does not get bound to Outer, even
though it is available to Worker.  You can use function locals but you lose
your clean nesting:

def namespaces():
class Something:
  pass
class Outer:
  class Inner:
class Worker:
  pass
  class InnerSubclass(Inner):
class Worker(Something):
  pass
return Outer

 Anyway, definitely a weird problem.  Maybe the class body should be able to
access the namespaces that wrap it, like functions do...  Not that I have
found them, but I would not be surprised if there have been plenty of
discussions around class body namespaces and nesting and closure...  It
would be great if it just worked, or at the very least you could do
something like this:

class Outer:
  class Inner:
class Worker:
  pass
  class InnerSubclass(Inner):
nonlocal Inner
class Worker(Inner.Worker):
  pass
return Outer

That would pull Inner into the namespace of InnerSubclass, allowing Worker
to use it in the bases declaration.

If you really want to get crazy, I suppose you could do so metaclass
hackery...

-eric


> Thanks,
>
>
> *larry*
> **
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: automated pep8 reformatter ?

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 12:03 PM, Ben Finney  wrote:
> A step forward might be the ‘reindent.py’ program included with the
> Python distribution.

I have tried to use this tool - but it lacks certain features.

Maybe I could use this as a starting point in writing such a tool :)

What I really want is to fix up common "poor" (IHMO) coding styles
in code that I have to maintain/review/etc. Things like:
* Lines longer than 80 characters
* Comments tacked on to the end of statements/expressions
* Use of ' vs. "
* More liberal use of Whitespace

Why ? Simple. Being vision impaired (in fact legally blind of <1% sight)
I find it hard to read and maintain code that exhibits poor coding style
(especially the above). -- It is of course very personal and very subjective.
(But hey maybe I should write a tool anyway!)

> Many PEP 8 violations can't be automatically fixed, they require the
> programmer to make a decision and edit the code. So first, introduce a
> code scanner that reports PEP 8 violations, such as ‘pylint’.

As stated, I'm not overly concerned with problems that a more sophisticated
static code analyzer such a pylint might find - I'm more interested in
readability more than anything. I often use pyflakes in conjunction with
pep8 to keep my own code clean, readable and consistent.

Thanks for the suggestion!

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ben Finney
James Mills  writes:

> On Thu, Apr 14, 2011 at 11:47 AM, Ethan Furman  wrote:
> > *Please* don't re-post his crap.
>
> Opps sorry :) I have never really known what to do with big-huge-long
> posts ? :)

Trim them to a representative sample. Or summarise, if there's no such
sample in the original. And, in either case, show that you've done so
with the editorial use of square brackets around your summary or
ellipsis.

> Won't happen again!

Thanks.

-- 
 \“I knew it was a shocking thing to say, but … no-one has the |
  `\right to spend their life without being offended.” —Philip |
_o__)  Pullman, 2010-03-28 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread Nathan Coulson
On Wed, Apr 13, 2011 at 7:03 PM, David Cournapeau  wrote:
> On Wed, Apr 13, 2011 at 5:17 PM, Nathan Coulson  wrote:
>> Well, as the subject says,  I am looking to find libpython31.a
>> [win64bit version] for use in a linux to windows 64bit cross compiler
>> [x86_64-w64-mingw32-gcc],  but seems to be missing.
>>
>> so far,  tried installing it on a real 64bit windows system,
>> cabextract, as well as msiexec /a python-3.1.3.amd64.msi /qb
>> TARGETDIR=out.  Either case, libs/libpython31.a is not there.
>>
>> as a last resort, tried cross compiling it with my tools, but a few
>> google searches tell me that way will lead to headaches, and currently
>> not supported out of the box.
>
> If you are willing to jump through a few oops. I have documented what
> I needed last time I tried mingw-w64 for numpy:
>
> http://projects.scipy.org/numpy/wiki/MicrosoftToolchainSupport
>
> If anything, it should be easier now because mingw-w64 is much more
> stable can can be installed without being compiled first (I wrote
> those notes almost 2 years ago IIRC),
>
> cheers,
>
> David

actually figured out a neat trick,  mingw-w64 can link directly to the .dll.
gcc file.c python31.dll -o file.exe

no .a needed.

http://www.mingw.org/wiki/sampleDLL

(have yet to find out if it actually works yet, but so far looks promising)

-- 
Nathan Coulson (conathan)
--
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Westley Martínez
On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote:
> You know Python is the best damn scripting language in the world.
> However we harbor a collective secret,  an elephant sized skeleton in
> the community closet, a shameful scarlet letter of heartlessness and
> ego centric-ity. Why is this the case? Why have let it go this far?
> And most importantly, why the heck are we not doing something about
> it?
> 
> I have said before that Tkinter is lacking, however in the same breath
> i laid out grandiose plans for a new beginning only to have my words
> fall on deaf ears. Have we become so self absorbed as to care only for
> our status and ego and not for the community at whole? Have we adopted
> a pecking order that has become so ingrained into our minds that it
> cannot escape the clutches of our own pedantic selfishness?
> 
> Some may wonder why i am ranting about this today, well i'll tell you.
> I use Tkinter quite liberally and i always seem to find a limitation
> of the GUI. Now, just because a package has limitation does not render
> it worthless, no! All packages have some limitations whether they be
> literal "brick wall limitations"[BWL], or "stumbling block
> limitations"[SBL], or whatever. Now, whilst i know for a fact that
> Tkinter has many dire [BWL] that render most packages moot. Most of
> the time a budding Tkinter noob will hit upon the stumbling block
> kind. The kind that not only trip you up, but send you flying face
> first in a festering and pungent cess pool full of feces and despair.
> 
> Why must this happen i ask? Whist most of us can agree that [BWL] must
> be accepted as "facts of life" we must never *ever* accept that [SBL]
> to be the norm.
> 
> Now you may be asking yourself, "What are some of the causes of
> "stumbling block limitations". Here is a short list in the promblem
> domain of software...
> 
>   * Poor Documentation or lack thereof
>   * Knowledge Hoarding
>   * Selfishness
>   * Lack of alturistic tendancies
> 
> These four points represent the meat and potatoes of a community in
> turmoil. A house divided against itself cannot stand. Lets discuss the
> points in detail one by one
> 
> -
> 1. Poor documentation (or lack thereof):
> -
> Everyone knows that dcoumentation is important however at the end of
> the day laziness is the rule of thumb for profesionals and weekend
> teckies alike. But why be a part of any open source community and
> propagate laziness? We must be more strict about doumentation. However
> it seems the age old policies of "it's not what you know, but *who*
> you know" or more correct;y adapted tot he situation at hand..."it's
> not imprtant how well you document a module *unless* you are not a
> goodfella (psst: a memeber of Guido inc).
> 
> -
> 2. Knowledge Hoarding:
> -
> Somehow, i dunno? I though this was an "open source" comminuty but boy
> was i wrong. The old "Practice what you preach" ring a bell anyone,
> hmm? We have people who would screm from the rafters about MS or some
> other company horading knowledge through evil software patenting
> practices however they have no problem going mum when "johnny the
> noob" can't get module x, y, or z working correctly because of PISS
> POOR DOCUMENTATION! I have enlightened this group long ago of the
> limitless possibilities of IDLE to be a good primer for our budding
> young programmers however like all my great brain children this one
> has been cast aside like a red headed stepchild. Guido himself carries
> most the blame squarely on his shoulders because as we all know IDLE
> was Guildo's baby. And at the beginning this baby looked like a
> keeper, however with years of neglect this baby has matured into a
> lackluster hodge podge of half baked ideas and little or no
> documentation. Not even the best pythonistas can follow this spaghetti
> code without setting aside a full weekend of seclusion that would make
> a hermit envious. Something must be done and i am sick and tired of
> the silence from capitol hill. I want Guido to answer for these
> crimes. I want hime to apologize, and i want him to sit down with me
> (and any other interested parties) so we can formulate a battle plan
> to get us out of this mess. The time for redemtion is nigh Mr Van
> Rossum.
> 
> -
> Selfishness and lack of alturistic tendancies.
> -
> Well those two go hand in hand.
> 
> nuff said.
> --rr

http://www.youtube.com/watch?v=z5jKMEB4hHE

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread rantingrick
On Apr 13, 8:29 pm, Ryan Kelly  wrote:
> On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote:

> Oh rr, if only the time you spent formulating such eloquent prose could
> be devoted instead to improving the documentation whose state you
> bemoan.

I would LOVE to improve the doc, however first the student THEN the
teacher. However in this forsaken land the "teachers" do not exist. We
are cast off from the elites and left to wither, wandering in dark
catacombs of source code with many doors but no keys to unlock them.

> I weep that your delightful rhetoric is limited to this neglected forum,
> where the guardians of python core deign not to tread, and hence denied
> its rightful place exalted among python's canonical lore.

I share your anguish. The "elites" have hidden themselves behind an
impenetrable wall called python-dev. They wish not to speak with the
peasants. However they "somehow" find the time to hurl insults though
alternate personalities. They so not have the fortitude to face me in
open battle on the fields of righteousness.

How can they sit up there and look at the tkinter package and keep a
strait face? What an abomination it has become. Anyone who is even a
mediocre professional programmer would look at such code and quickly
discredit the whole community as a bunch of amateurs.

Q1: Why are we allowing this code to exist?
Q2: Why is no one beside myself speaking out?
Q3: Were is the chairman of PSF Steve Holden on these pressing
matters?
Q4: Where is Guido van Rossum for crying out loud? When is he going to
address this issue in public OUTSIDE the safety and comfort of python-
dev?

Come and face me Guido. Surely i am not too scary for you? Answer for
these crimes Guido and then you will be forgiven. Then we can move on.
Then we can be a real community again. We need you to get involved on
a more personal level with our community members. I want to see you
shaking hands and kissing babies. Show your face and let the light
illuminate even the darkest corners of c.l.p. Free your conscience of
these past atrocities...  "For the meek shall inherit and the wicked
be cast into oblivion". Trolls, your days are numbered!

Mr. Van Rossum I look forward to your cooperation and would be
delighted to hear any ideas you may have.

--rr
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: automated pep8 reformatter ?

2011-04-13 Thread Ben Finney
James Mills  writes:

> Does anyone know of a tool that will help with reformatting badly
> written code to be pep8 compliant ?

A step forward might be the ‘reindent.py’ program included with the
Python distribution.

Many PEP 8 violations can't be automatically fixed, they require the
programmer to make a decision and edit the code. So first, introduce a
code scanner that reports PEP 8 violations, such as ‘pylint’.

-- 
 \“[R]ightful liberty is unobstructed action, according to our |
  `\will, within limits drawn around us by the equal rights of |
_o__) others.” —Thomas Jefferson, 1819 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 11:47 AM, Ethan Furman  wrote:
> *Please* don't re-post his crap.

Opps sorry :) I have never really known what to do with big-huge-long posts ? :)

Won't happen again!

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Thu, 2011-04-14 at 11:46 +1000, Chris Angelico wrote:
> On Thu, Apr 14, 2011 at 11:29 AM, Ryan Kelly  wrote:
> > I weep that your delightful rhetoric is limited to this neglected forum,
> > where the guardians of python core deign not to tread, and hence denied
> > its rightful place exalted among python's canonical lore.
> 
> Wait... so where do the Python experts hang out?

Don't panic, there are plenty of experts here :-)

It's an oft-cited troll complaint that many python big-wigs (Guido,
Raymond H, et al) don't subscribe to python-list.

Personally I've never really noticed - even if some of the core devs
don't really hang out here, I've always found python-list full of
helpful and knowledgeable people.

It's also an oft-cited troll conspiracy that Guido hangs out on
python-list and posts under various pseudonyms.  I think it would be
kinda fun if he did...


  Cheers,

 Ryan

-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
r...@rfk.id.au|  http://www.rfk.id.au/ramblings/gpg/ for details



signature.asc
Description: This is a digitally signed message part
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread David Cournapeau
On Wed, Apr 13, 2011 at 5:17 PM, Nathan Coulson  wrote:
> Well, as the subject says,  I am looking to find libpython31.a
> [win64bit version] for use in a linux to windows 64bit cross compiler
> [x86_64-w64-mingw32-gcc],  but seems to be missing.
>
> so far,  tried installing it on a real 64bit windows system,
> cabextract, as well as msiexec /a python-3.1.3.amd64.msi /qb
> TARGETDIR=out.  Either case, libs/libpython31.a is not there.
>
> as a last resort, tried cross compiling it with my tools, but a few
> google searches tell me that way will lead to headaches, and currently
> not supported out of the box.

If you are willing to jump through a few oops. I have documented what
I needed last time I tried mingw-w64 for numpy:

http://projects.scipy.org/numpy/wiki/MicrosoftToolchainSupport

If anything, it should be easier now because mingw-w64 is much more
stable can can be installed without being compiled first (I wrote
those notes almost 2 years ago IIRC),

cheers,

David
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: automated pep8 reformatter ?

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 11:47 AM, James Mills
 wrote:
> Does anyone know of a tool that will help with
> reformatting badly written code to be pep8 compliant ?
>
> a 2to3 for pep8 ?

In case there is no such tool (And I don't have the time to write one)
I've found this to be really useful (so far):

http://www.vim.org/scripts/script.php?script_id=2914

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list



Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ethan Furman

James Mills wrote:

On Thu, Apr 14, 2011 at 10:39 AM, rantingrick  wrote:


[weapon of mass-snippitude]

James,

*Please* don't re-post his crap.

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list


automated pep8 reformatter ?

2011-04-13 Thread James Mills
Does anyone know of a tool that will help with
reformatting badly written code to be pep8 compliant ?

a 2to3 for pep8 ?

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote:
>
> -
> 1. Poor documentation (or lack thereof):
> -
> Everyone knows that dcoumentation is important however at the end of
> the day laziness is the rule of thumb for profesionals and weekend
> teckies alike. But why be a part of any open source community and
> propagate laziness? We must be more strict about doumentation. However
> it seems the age old policies of "it's not what you know, but *who*
> you know" or more correct;y adapted tot he situation at hand..."it's
> not imprtant how well you document a module *unless* you are not a
> goodfella (psst: a memeber of Guido inc).

Oh rr, if only the time you spent formulating such eloquent prose could
be devoted instead to improving the documentation whose state you
bemoan.

I weep that your delightful rhetoric is limited to this neglected forum,
where the guardians of python core deign not to tread, and hence denied
its rightful place exalted among python's canonical lore.


> I have enlightened this group long ago of the
> limitless possibilities of IDLE to be a good primer for our budding
> young programmers however like all my great brain children this one
> has been cast aside like a red headed stepchild.

I can only imagine the hi-jinx that ensure at your yearly great brain
family reunion.


  Ryan 

-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
r...@rfk.id.au|  http://www.rfk.id.au/ramblings/gpg/ for details



signature.asc
Description: This is a digitally signed message part
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread rantingrick
On Apr 13, 8:10 pm, James Mills  wrote:
> On Thu, Apr 14, 2011 at 10:39 AM, rantingrick  wrote:
[...]

Hello James,

Whist your post was a bit abrasive i know you are a good person so
that is why i am replying.

> It would be nice for once to see you get off your
> lazy "butt" and actually do something rather than
> continually "rant" at us. Most of us (myself included)
> simply use Python in our day jobs or as a hobby.

I am working James, very hard a work as a matter of fact. I am
planting seeds, seeds for change. But as we know seeds need to be sown
and many bitter winters are keeping these seed from budding into
healthy saplings. In my dream of dreams i see a completely re-written
IDLE, something this community can be proud of, something that young
Python programmers can look to for guidance and knowledge.
Unfortunatly this "something" should have been done long ago but the
will is not there. However no project will ever get "will" unless the
parties start working togehter without prejudices. And this prejudiced
is coming directly from the top tiers of this community. ALL THE WAY
TO THE TOP... james.

> Not once have I seen you actually "do something":
> 1) Write a patch

I have wrote patches, many of them. Some people have written more than
me but mine still count

> 2) Formalize a new design for xyz

I have been formalizing and crusading for many design changes however
my roads have been blocked at every turn by egos and elites.

> 3) File a bug report for xyz

I have mentioned many bugs on this list.

> Complaining doesn't really get you very far, nor does
> berating others (even if indirectly).

There is nothing "indirect" about my statements Mr Mills. They are
meant for a few trouble makers and these trouble makers know who they
are.

> Whilst I agree that there are some folk who "might"
> be guilty of egotist / arrogant attitudes there isn't
> much anyone can do abou that - that's just part of
> life and part of social interaction(s). Get over it.

No, ignoring a problem does not make it go away. We must fight
relentlessly against the infiltration of selfishness into our beloved
community. Just think what would have happend if the world ignored
that little fiery piss ant from Austria with the excessive nose hairs.

> For the most part - the Python Community as a whole
> is very helpful, positive and has a lot of nice thinigs about it
> (not just the language).

Well then let us challenge this community. A pepsi challenge if you
will. Who will help me solve the problem that currently plagues my
Tkinter code? Anyone... i thought so.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 10:39 AM, rantingrick  wrote:
> You know Python is the best damn scripting language in the world.
> However we harbor a collective secret,  an elephant sized skeleton in
> the community closet, a shameful scarlet letter of heartlessness and
> ego centric-ity. Why is this the case? Why have let it go this far?
> And most importantly, why the heck are we not doing something about
> it?
>
> I have said before that Tkinter is lacking, however in the same breath
> i laid out grandiose plans for a new beginning only to have my words
> fall on deaf ears. Have we become so self absorbed as to care only for
> our status and ego and not for the community at whole? Have we adopted
> a pecking order that has become so ingrained into our minds that it
> cannot escape the clutches of our own pedantic selfishness?
>
> Some may wonder why i am ranting about this today, well i'll tell you.
> I use Tkinter quite liberally and i always seem to find a limitation
> of the GUI. Now, just because a package has limitation does not render
> it worthless, no! All packages have some limitations whether they be
> literal "brick wall limitations"[BWL], or "stumbling block
> limitations"[SBL], or whatever. Now, whilst i know for a fact that
> Tkinter has many dire [BWL] that render most packages moot. Most of
> the time a budding Tkinter noob will hit upon the stumbling block
> kind. The kind that not only trip you up, but send you flying face
> first in a festering and pungent cess pool full of feces and despair.
>
> Why must this happen i ask? Whist most of us can agree that [BWL] must
> be accepted as "facts of life" we must never *ever* accept that [SBL]
> to be the norm.
>
> Now you may be asking yourself, "What are some of the causes of
> "stumbling block limitations". Here is a short list in the promblem
> domain of software...
>
>        * Poor Documentation or lack thereof
>        * Knowledge Hoarding
>        * Selfishness
>        * Lack of alturistic tendancies
>
> These four points represent the meat and potatoes of a community in
> turmoil. A house divided against itself cannot stand. Lets discuss the
> points in detail one by one
>
> -
> 1. Poor documentation (or lack thereof):
> -
> Everyone knows that dcoumentation is important however at the end of
> the day laziness is the rule of thumb for profesionals and weekend
> teckies alike. But why be a part of any open source community and
> propagate laziness? We must be more strict about doumentation. However
> it seems the age old policies of "it's not what you know, but *who*
> you know" or more correct;y adapted tot he situation at hand..."it's
> not imprtant how well you document a module *unless* you are not a
> goodfella (psst: a memeber of Guido inc).
>
> -
> 2. Knowledge Hoarding:
> -
> Somehow, i dunno? I though this was an "open source" comminuty but boy
> was i wrong. The old "Practice what you preach" ring a bell anyone,
> hmm? We have people who would screm from the rafters about MS or some
> other company horading knowledge through evil software patenting
> practices however they have no problem going mum when "johnny the
> noob" can't get module x, y, or z working correctly because of PISS
> POOR DOCUMENTATION! I have enlightened this group long ago of the
> limitless possibilities of IDLE to be a good primer for our budding
> young programmers however like all my great brain children this one
> has been cast aside like a red headed stepchild. Guido himself carries
> most the blame squarely on his shoulders because as we all know IDLE
> was Guildo's baby. And at the beginning this baby looked like a
> keeper, however with years of neglect this baby has matured into a
> lackluster hodge podge of half baked ideas and little or no
> documentation. Not even the best pythonistas can follow this spaghetti
> code without setting aside a full weekend of seclusion that would make
> a hermit envious. Something must be done and i am sick and tired of
> the silence from capitol hill. I want Guido to answer for these
> crimes. I want hime to apologize, and i want him to sit down with me
> (and any other interested parties) so we can formulate a battle plan
> to get us out of this mess. The time for redemtion is nigh Mr Van
> Rossum.
>
> -
> Selfishness and lack of alturistic tendancies.
> -
> Well those two go hand in hand.
>
> nuff said.

(I realize I'm also feeding the troll here but...)

RIck (if that's even your real name).

It would be nice for once to see you get off your
lazy "butt" and actually do something rather than
continually "rant" at us. Most of us (myself included)
simply use Python in our day jobs or as a hobby.

Not once have I seen you actually "do something":
1) Write a patch
2) Formalize a 

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Littlefield, Tyler

RR:
I do have to ask, before I feed the troll, where the hell is your 
spellchecker? And you were talking about people being lazy? The irony is 
killing me.


Now, you've been told you can fork Idol if you so choose, and you've 
been told to write up information on how you want to replace TKInter as 
well as start the ball rolling in that direction. Why don't you return 
under your rock, or do one of these rather than insulting everyone here 
and demanding people sit down with -you- to formulate a "battle plan?"

--
http://mail.python.org/mailman/listinfo/python-list


Egos, heartlessness, and limitations

2011-04-13 Thread rantingrick

You know Python is the best damn scripting language in the world.
However we harbor a collective secret,  an elephant sized skeleton in
the community closet, a shameful scarlet letter of heartlessness and
ego centric-ity. Why is this the case? Why have let it go this far?
And most importantly, why the heck are we not doing something about
it?

I have said before that Tkinter is lacking, however in the same breath
i laid out grandiose plans for a new beginning only to have my words
fall on deaf ears. Have we become so self absorbed as to care only for
our status and ego and not for the community at whole? Have we adopted
a pecking order that has become so ingrained into our minds that it
cannot escape the clutches of our own pedantic selfishness?

Some may wonder why i am ranting about this today, well i'll tell you.
I use Tkinter quite liberally and i always seem to find a limitation
of the GUI. Now, just because a package has limitation does not render
it worthless, no! All packages have some limitations whether they be
literal "brick wall limitations"[BWL], or "stumbling block
limitations"[SBL], or whatever. Now, whilst i know for a fact that
Tkinter has many dire [BWL] that render most packages moot. Most of
the time a budding Tkinter noob will hit upon the stumbling block
kind. The kind that not only trip you up, but send you flying face
first in a festering and pungent cess pool full of feces and despair.

Why must this happen i ask? Whist most of us can agree that [BWL] must
be accepted as "facts of life" we must never *ever* accept that [SBL]
to be the norm.

Now you may be asking yourself, "What are some of the causes of
"stumbling block limitations". Here is a short list in the promblem
domain of software...

* Poor Documentation or lack thereof
* Knowledge Hoarding
* Selfishness
* Lack of alturistic tendancies

These four points represent the meat and potatoes of a community in
turmoil. A house divided against itself cannot stand. Lets discuss the
points in detail one by one

-
1. Poor documentation (or lack thereof):
-
Everyone knows that dcoumentation is important however at the end of
the day laziness is the rule of thumb for profesionals and weekend
teckies alike. But why be a part of any open source community and
propagate laziness? We must be more strict about doumentation. However
it seems the age old policies of "it's not what you know, but *who*
you know" or more correct;y adapted tot he situation at hand..."it's
not imprtant how well you document a module *unless* you are not a
goodfella (psst: a memeber of Guido inc).

-
2. Knowledge Hoarding:
-
Somehow, i dunno? I though this was an "open source" comminuty but boy
was i wrong. The old "Practice what you preach" ring a bell anyone,
hmm? We have people who would screm from the rafters about MS or some
other company horading knowledge through evil software patenting
practices however they have no problem going mum when "johnny the
noob" can't get module x, y, or z working correctly because of PISS
POOR DOCUMENTATION! I have enlightened this group long ago of the
limitless possibilities of IDLE to be a good primer for our budding
young programmers however like all my great brain children this one
has been cast aside like a red headed stepchild. Guido himself carries
most the blame squarely on his shoulders because as we all know IDLE
was Guildo's baby. And at the beginning this baby looked like a
keeper, however with years of neglect this baby has matured into a
lackluster hodge podge of half baked ideas and little or no
documentation. Not even the best pythonistas can follow this spaghetti
code without setting aside a full weekend of seclusion that would make
a hermit envious. Something must be done and i am sick and tired of
the silence from capitol hill. I want Guido to answer for these
crimes. I want hime to apologize, and i want him to sit down with me
(and any other interested parties) so we can formulate a battle plan
to get us out of this mess. The time for redemtion is nigh Mr Van
Rossum.

-
Selfishness and lack of alturistic tendancies.
-
Well those two go hand in hand.

nuff said.
--rr
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python & Sybase

2011-04-13 Thread Ivan
Chris,

There are few more, depending which sybase database.
More info on this link: http://wiki.python.org/moin/Sybase

Cheers,
Ivan


On Thu, Apr 14, 2011 at 6:36 AM, Dan Stromberg  wrote:

> http://www.freetds.org/
>
> There's likely also one you could get from your database admin.
>
> On Wed, Apr 13, 2011 at 8:40 AM, Chris M. Bartos
>  wrote:
> > Hi,
> >
> > Are there any database drivers that allows Python to connect to remote
> > Sybase Databases.
> > I tried python-sybase, but somehow couldn't get it to connect remotely,
> only
> > locally...?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Forcing absolute package imports in 2.7?

2011-04-13 Thread Aahz
In article ,
Michael Parker   wrote:
>
>I'm reading Learning Python 4th Edition by Lutz. In the section on
>relative package imports, he says: "In Python 3.0, the `import
>modname` statement is always absolute, skipping the containing
>package=92s directory. In 2.6, this statement form still performs
>relative imports today (i.e., the package=92s directory is searched
>first), but these will become absolute in Python 2.7, too.`
>
>But in my own testing I'm not seeing this behavior. Was it not
>included in 2.7 for fear of breaking too many programs?

from __future__ import absolute_import   
-- 
Aahz (a...@pythoncraft.com)   <*> http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just
refer to comments in code as 'lies'. :-)"
--Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22
-- 
http://mail.python.org/mailman/listinfo/python-list


virtualenv problem on win32

2011-04-13 Thread Danny Shevitz
Howdy,

I'm trying to use virtualenv for the first time and having endless grief. 
I have upgraded my python distribution to the latest 2.7 distribution and it
is completely clean. I have prepended my path environment variable with
c:\python27 and c:\python27\scripts. 
I have installed:
setuptools 0.6c11 
virtualenv 1.6 
windows extensions (I have read some posts that this might be important...)

When I try to create a virtual environment at the shell prompt:
virtualenv ENV

I get the following error:

###
d:\>virtualenv ENV
New python executable in ENV\Scripts\python.exe
Installing setuptools
  Complete output from command d:\ENV\Scripts\python.exe -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" c:\python27\lib\site...ols-0.6c11-py2.7.egg:
  Processing setuptools-0.6c11-py2.7.egg
creating d:\env\lib\site-packages\setuptools-0.6c11-py2.7.egg
Extracting setuptools-0.6c11-py2.7.egg to d:\env\lib\site-packages
Traceback (most recent call last):
  File "", line 279, in 
  File "", line 240, in main
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
1712, in main
with_ei_usage(lambda:
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
1700, in with_ei_usage
return f()
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
1716, in 
distclass=DistributionWithoutHelpCommands, **kw
  File "c:\python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
  File "c:\python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
  File "c:\python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
211, in run
self.easy_install(spec, not self.no_deps)
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
427, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
476, in install_item
dists = self.install_eggs(spec, download, tmpdir)
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
619, in install_eggs
return [self.install_egg(dist_filename, tmpdir)]
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
693, in install_egg
(os.path.basename(egg_path),os.path.dirname(destination)))
  File "c:\python27\Lib\distutils\cmd.py", line 349, in execute
util.execute(func, args, msg, dry_run=self.dry_run)
  File "c:\python27\Lib\distutils\util.py", line 401, in execute
func(*args)
  File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
996, in unpack_and_compile
unpack_archive(egg_path, destination, pf)
  File "c:\python27\lib\site-packages\setuptools\archive_util.py", line 67, in u
npack_archive
driver(filename, extract_dir, progress_filter)
  File "c:\python27\lib\site-packages\setuptools\archive_util.py", line 135, in
unpack_zipfile
z = zipfile.ZipFile(filename)
  File "c:\python27\Lib\zipfile.py", line 712, in __init__
self._GetContents()
  File "c:\python27\Lib\zipfile.py", line 746, in _GetContents
self._RealGetContents()
  File "c:\python27\Lib\zipfile.py", line 786, in _RealGetContents
raise BadZipfile, "Bad magic number for central directory"
zipfile.BadZipfile: Bad magic number for central directory

...Installing setuptools...done.
Traceback (most recent call last):
  File "c:\python27\scripts\virtualenv-script.py", line 8, in 
load_entry_point('virtualenv==1.6', 'console_scripts', 'virtualenv')()
  File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 745, in main
prompt=options.prompt)
  File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 843, in create_environment
install_setuptools(py_executable, unzip=unzip_setuptools)
  File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 571, in install_setuptools
_install_req(py_executable, unzip)
  File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 547, in _install_req
cwd=cwd)
  File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 813, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command d:\ENV\Scripts\python.exe -c "#!python
\"\"\"Bootstra...sys.argv[1:])

" c:\python27\lib\site...ols-0.6c11-py2.7.egg failed with error code 1
###

does anyone know what is going on?

thanks,
Danny

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Postmortem on Unladen Swallow

2011-04-13 Thread Dan Stromberg
I'm not sure I'd call it a failure.

It didn't achieve the speedup they hoped for, but they did
successfully get CPython running overtop of LLVM.  That is, their
intended approach didn't pan out, but they successfully implemented
their approach.

And just as importantly, Pypy was looking like it'd take some years
more to make it useful in production, and would likely never be able
to run C extension modules - but now we know now that neither of these
is true.

On Wed, Apr 13, 2011 at 11:11 AM, John Nagle  wrote:
> There's a postmortem on the failure of Unladen Swallow by one of the
> developers at:
>
> http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospective.html
>
>                                John Nagle
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python & Sybase

2011-04-13 Thread Dan Stromberg
http://www.freetds.org/

There's likely also one you could get from your database admin.

On Wed, Apr 13, 2011 at 8:40 AM, Chris M. Bartos
 wrote:
> Hi,
>
> Are there any database drivers that allows Python to connect to remote
> Sybase Databases.
> I tried python-sybase, but somehow couldn't get it to connect remotely, only
> locally...?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread Martin v. Loewis
Am 13.04.2011 10:17, schrieb Nathan Coulson:
> Well, as the subject says,  I am looking to find libpython31.a
> [win64bit version] for use in a linux to windows 64bit cross compiler
> [x86_64-w64-mingw32-gcc],  but seems to be missing.

I wouldn't call it "missing", but "just not there". I had no
intention/procedure to create it, so it isn't being created,
and hence not packaged, either.

> so far,  tried installing it on a real 64bit windows system,
> cabextract, as well as msiexec /a python-3.1.3.amd64.msi /qb
> TARGETDIR=out.  Either case, libs/libpython31.a is not there.
> 
> as a last resort, tried cross compiling it with my tools, but a few
> google searches tell me that way will lead to headaches, and currently
> not supported out of the box.

The problem is deeper than that. Even if you had the library, you
probably still couldn't do what you want to do (although you didn't
actually say what it is that you want to do): building extensions
with mingw64 currently isn't supported at all.

So if you want to build extension modules for Win64, use Visual
Studio (and/or the platform SDK).

Regards,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Postmortem on Unladen Swallow

2011-04-13 Thread John Nagle

There's a postmortem on the failure of Unladen Swallow by one of the
developers at:

http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospective.html

John Nagle
--
http://mail.python.org/mailman/listinfo/python-list


Re: split string but ignore sep inside double quotes

2011-04-13 Thread Andrea Crotti
Andrea Crotti  writes:
>
> I'm not sure how but also this seems to work:
> In[20]: s = '2,"some, text",more text'
>
> In [21]: re.split(r'(?<=">),', s)
> Out[21]: ['2,"some, text",more text']
>
> I just wanted to try the lookahead functions, which I never use but
> sometimes might come handy.

Eh eh no sorry I misread the output, it's a list with one element in
this case...
So anyway I suppose you can look ahead or before if there is a " and
don't match the "," in this case, that was the main idea.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: split string but ignore sep inside double quotes

2011-04-13 Thread Andrea Crotti
Jonno  writes:

> All,
>
> I have the following unicode object:
> u'3,"Some, text",more text'
>
> and I want to split it into a list like this:
> [3,"Some, text", more text]
>
> In other words I want to split on the comma but not if it's inside a
> double-quote.
>
> Thanks.

I'm not sure how but also this seems to work:
In[20]: s = '2,"some, text",more text'

In [21]: re.split(r'(?<=">),', s)
Out[21]: ['2,"some, text",more text']

I just wanted to try the lookahead functions, which I never use but
sometimes might come handy.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Loading Modules

2011-04-13 Thread Peter Otten
Cornelius Kölbel wrote:

> I am wondering about loading modules.What is a good way of doing this?
> 
> In my code I got one single function, where I need some functionality
> from a built-in module.

built-in modules are always imported by definition, so you cannot save space 
or time by moving the import statement into the function. You can find the 
true built-in modules with

sys.builtin_module_names

and the modules that may have been imported indirectly by other modules you 
are using with

sys.modules

> Is it a better way to load the module only within the function
>   pro: the function will only be hit every now and then or only with a
> probability of 90%.
>  So in 90% cases the modules will not be loaded. (preserve
> resources)
> 
> What is the balance between speed, resources and code style?

I doubt that you'll save a significant amount of space/time, and you make 
your module's dependencies less obvious.

> Is there a pythonian way for deciding in which case to do what?

The pythonic approach is to measure; run your script with and without the 
tentative optimization and then decide whether the extra complication pays 
off.

-- 
http://mail.python.org/mailman/listinfo/python-list


Python & Sybase

2011-04-13 Thread Chris M. Bartos

Hi,

Are there any database drivers that allows Python to connect to remote 
Sybase Databases.
I tried python-sybase, but somehow couldn't get it to connect remotely, 
only locally...?


Thanks for your help,

--
Christopher M. Bartos
bartos...@osu.edu
330-324-0018

Systems Developer
Arabidopsis Biological Resource Center
The Ohio State University
055 Rightmire Hall
1060 Carmack Rd
Columbus, OH 43210

Website: http://abrc.osu.edu

--
http://mail.python.org/mailman/listinfo/python-list


Loading Modules

2011-04-13 Thread Cornelius Kölbel
Hello list,

I am wondering about loading modules.What is a good way of doing this?

In my code I got one single function, where I need some functionality
from a built-in module.

Is it a better way to load the module only within the function
  pro: the function will only be hit every now and then or only with a
probability of 90%.
 So in 90% cases the modules will not be loaded. (preserve
resources)

What is the balance between speed, resources and code style?

Is there a pythonian way for deciding in which case to do what?

Kind regards
Cornelius



signature.asc
Description: OpenPGP digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: split string but ignore sep inside double quotes

2011-04-13 Thread Tim Golden

On 13/04/2011 15:59, Jonno wrote:

I have the following unicode object:
u'3,"Some, text",more text'

and I want to split it into a list like this:
[3,"Some, text", more text]

In other words I want to split on the comma but not if it's inside a
double-quote.


You want the csv module which is designed for *exactly* this
form of data.

TJG
--
http://mail.python.org/mailman/listinfo/python-list


split string but ignore sep inside double quotes

2011-04-13 Thread Jonno
All,

I have the following unicode object:
u'3,"Some, text",more text'

and I want to split it into a list like this:
[3,"Some, text", more text]

In other words I want to split on the comma but not if it's inside a
double-quote.

Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use optparse without the command line?

2011-04-13 Thread Miki Tebeka
> But I find it dumb to encode and decode a dictionary... So I would
> like to know how I if there is a good way of passing a dictionary to
> optparse and benefiting from its option management (check, error
> detection, etc).
I don't think you can get away from encoding/decoding the option dictionary. 
You can merge the options from the command line though.
options = {"a" : 1, "b" : 2}
opts, args = parser.parse_args()
options.update(opts.__dict__)

HTH
--
Miki Tebeka 
http://pythonwise.blogspot.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use optparse without the command line?

2011-04-13 Thread markolopa
On Apr 8, 11:58 pm, Karim  wrote:
> On 04/07/2011 10:37 AM, markolopa wrote:
>
> > Is there support/idioms/suggestions for usingoptparsewithout a
> >commandline?
>
> > I have a code which used to be called through subprocess. The whole
> > flow of the code is based on what 'options' object fromoptparse
> > contains.
>
> > Now I want to call this code without subprocessing. What I did first
> > was to build a "fake"command-line and use
>
> > options, args = parser.parse_args(fake_cmdline)
>
> > But I find it dumb to encode and decode a dictionary... So I would
> > like to know how I if there is a good way of passing a dictionary to
> >optparseand benefiting from its option management (check, error
> > detection, etc).
>
> Move to the best module on args parsing: argparse it is way, way, way
> better no equivalent in any others language.
> No tuple when parsing but a simple Namespace objects and very easy to
> port. Go have a look in std libs (>=v2.7).

argparse seems great for my needs, in particular because the usage of
namespace objects. Do you know if there is a way to use it with Python
2.6? My colleagues won't accept to upgrade the Python version anytime
soon.

Thanks a lot!
Marko
-- 
http://mail.python.org/mailman/listinfo/python-list


Help

2011-04-13 Thread Venkatesh Sanganal
Hello Sir,
> 
> We are using WATSUP(Python) package for MFC GUI automation(developed in 
> Visual Studio 2005), We wanted your suppor, since we are having some issues 
> listed below;
> 
> 1.How can we get handle of Ultimate grid control (Ultimate tool box 7) in a 
> MFC application so that we can access each cell of the grid and can read and 
> write in the cells?
> 
> 2.How can we get handle of Flexm grid control (MS Flex Grid) in a MFC 
> application so that we can access each cell of the grid and can read and 
> write in the cells?
> 
> 3.Can we capture values from grid cells at sharp intervals of time (in 
> milliseconds), validate  and run dependent test cases through python 
> scripting? 
> 
> 4.How can we get control over List view control in a MFC application? 
> 
> Please help us in this regard, since we have gone through many forums... but 
> didnt get the help...
> 
> 
> Thanking You,


Regards
*
Venkatesh Sanganal
Asst Manager(Design),
Spectrum Infotech Pvt Ltd,
(Larsen & Toubro Ltd )
145/2, Komarla Solitaire,
Old Madras Rd, CV Raman nagar,
Nagavarapalya, Blr-560093
Phone: 91.80.67745144
Email:venkatesh.sanga...@lntsec.com Mobile : 9448349200
**





  
Larsen & Toubro Limited 
www.larsentoubro.com 

This Email may contain confidential or privileged information for the intended 
recipient (s) If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system. 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Feature suggestion -- return if true

2011-04-13 Thread Teemu Likonen
* 2011-04-12T13:26:48-07:00 * Chris Rebert wrote:

> I think Ben "Yahtzee" Croshaw's comments on open-world sandbox video
> games (of all things) have a lot of applicability to why allowing
> full-on macros can be a bad idea.

> IOW, a language is usually better for having such discussions and
> having a fairly coherent worldview enforced by the existence of a
> managing authority.

Thanks for the info. That's a strange view, and I must disagree. Lisp
people certainly love the power they have. But different language,
different philosophy, I guess.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: file deleted

2011-04-13 Thread Andrea Crotti
luca72  writes:

> hello i'm working with eric, running a program eric crash and when i
> try to open my project again with eric i see that myproject.py is
> deleted, but my project is still running there is a way to find
> myprogram.py file aving it in execution?

It's more about your operating system than python the question.
Anyway you should use an SCM like git/subversion/whatever and then
you'll not worry anymore to lose files.

If you delete it by mistake you just revert it from the history in that case.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Nested inner classes and inheritance -> namespace problem

2011-04-13 Thread Jean-Michel Pichavant

Larry Hastings wrote:


The problem: if you're currently in a nested class, you can't look up 
variables in the outer "class scope".


For example, this code fails in Python 3:

class Outer:
  class Inner:
class Worker:
  pass

  class InnerSubclass(Inner):
class Worker(Inner.Worker):
  pass

It fails at the definition of Worker inside InnerSubclass.  Python 3 
can't find "Inner", in order to get to "Inner.Worker".


Adding "global Inner" just above that line doesn't help--it's not a 
global.
Adding "nonlocal Inner" just above that line doesn't help either--I 
suppose it's the /wrong kind/ of nonlocal.  nonlocal is for nested 
functions, and this uses nested classes.


You can tell me YAGNI, but I tripped over this because I wanted it.  
It's not a contrived example.  I actually use inner classes a lot; I 
suppose I'm relatively alone in doing so.


Yes, I could make the problem go away if I didn't have nested inner 
classes like this.  But I like this structure.  Any idea how I can 
make it work while preserving the nesting and inheritance?


Thanks,


/larry/

class Outer:
 class Inner:
   class Worker:
 pass

 print 'Outer ', locals()
 class InnerSubclass(Inner):
   print 'InnerSubclass', locals()
   class Worker:
 pass

Outer  {'__module__': '__main__', 'Inner': 0x963a7ac>}

InnerSubclass {'__module__': '__main__'}

I use myself nested classes a lot, but only as namespace / enum, meaning 
there is no inheritance involved. I don't think that you can do what you 
are trying to do.

Outer would actually be a module, not a class.

JM
--
http://mail.python.org/mailman/listinfo/python-list


Re: pyc to py

2011-04-13 Thread Chris Rebert
On Wed, Apr 13, 2011 at 2:46 AM, luca72  wrote:
> I have pyc file written with python 2.6.5 and i need to return to py
> file, can you give me some ideas tools script etc.

http://www.crazy-compilers.com/decompyle/

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list


pyc to py

2011-04-13 Thread luca72
I have pyc file written with python 2.6.5 and i need to return to py
file, can you give me some ideas tools script etc.
Luca
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Nested inner classes and inheritance -> namespace problem

2011-04-13 Thread James Mills
On Wed, Apr 13, 2011 at 7:12 PM, Larry Hastings  wrote:
> Yes, I could make the problem go away if I didn't have nested inner classes
> like this.  But I like this structure.  Any idea how I can make it work
> while preserving the nesting and inheritance?

It's probably better to make use of modules here
as opposed to nesting classes.

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list


Nested inner classes and inheritance -> namespace problem

2011-04-13 Thread Larry Hastings


The problem: if you're currently in a nested class, you can't look up 
variables in the outer "class scope".


For example, this code fails in Python 3:

   class Outer:
  class Inner:
class Worker:
  pass

  class InnerSubclass(Inner):
class Worker(Inner.Worker):
  pass

It fails at the definition of Worker inside InnerSubclass.  Python 3 
can't find "Inner", in order to get to "Inner.Worker".


Adding "global Inner" just above that line doesn't help--it's not a global.
Adding "nonlocal Inner" just above that line doesn't help either--I 
suppose it's the /wrong kind/ of nonlocal.  nonlocal is for nested 
functions, and this uses nested classes.


You can tell me YAGNI, but I tripped over this because I wanted it.  
It's not a contrived example.  I actually use inner classes a lot; I 
suppose I'm relatively alone in doing so.


Yes, I could make the problem go away if I didn't have nested inner 
classes like this.  But I like this structure.  Any idea how I can make 
it work while preserving the nesting and inheritance?


Thanks,


/larry/
//
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Do UART require data structure/format for serial communication?

2011-04-13 Thread VGNU Linux
Actually I am trying to data communication between these 2 chips, but facing
troubles in deciding a protocol to do the same.
Do UART have any default protocols? For the moment I am trying to do it with
Strings but not sure if that's the right solution.

Regards,
Vivek

On Mon, Apr 11, 2011 at 11:43 PM, John Nagle  wrote:

> On 4/11/2011 4:57 AM, Jean-Michel Pichavant wrote:
>
>  VGNU Linux wrote:
>>
>>> Hi All,
>>> I have two chips one understands Python and the other embedded C.I
>>> have connected both chips using UART serial communication channel,
>>> however I have no idea how data communication must be achieved between
>>> this 2 chips. As for example send using C chip string "Hello Python"
>>> which python chip easily understands and replies back a string "Hi C".
>>> I am pretty new to embedded systems can anybody help me understand
>>> data communication using UART.
>>> Thank in advance.
>>>
>>
>What do you want to do?
>
>There are many serial protocols.  At the low end, you can
> send text. At the high end, you can send TCP over PPP.
> The Arduno crowd has some protocols of their own.  See
> "http://www.arduino.cc/en/Reference/Libraries";.
>
>Any useful protocol must be able to deal with errors
> on the link, either end restarting, and the other end failing
> to respond.  All those things happen frequently with serial
> ports.
>
>What do you want to do?
>
>John Nagle
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread Nathan Coulson
Well, as the subject says,  I am looking to find libpython31.a
[win64bit version] for use in a linux to windows 64bit cross compiler
[x86_64-w64-mingw32-gcc],  but seems to be missing.

so far,  tried installing it on a real 64bit windows system,
cabextract, as well as msiexec /a python-3.1.3.amd64.msi /qb
TARGETDIR=out.  Either case, libs/libpython31.a is not there.

as a last resort, tried cross compiling it with my tools, but a few
google searches tell me that way will lead to headaches, and currently
not supported out of the box.

-- 
Nathan Coulson (conathan)
--
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com
-- 
http://mail.python.org/mailman/listinfo/python-list


file deleted

2011-04-13 Thread luca72
hello i'm working with eric, running a program eric crash and when i
try to open my project again with eric i see that myproject.py is
deleted, but my project is still running there is a way to find
myprogram.py file aving it in execution?
-- 
http://mail.python.org/mailman/listinfo/python-list