Re: Picking a license

2010-05-13 Thread Steven D'Aprano
On Wed, 12 May 2010 22:16:29 -0700, Patrick Maupin wrote:

> On May 12, 10:48 pm, Lawrence D'Oliveiro  central.gen.new_zealand> wrote:
>> In message , Ed
>> Keith wrote:
>>
>> > ... but to claim that putting more restrictions on someone give them
>> > more freedom is pure Orwellian double speak.
>>
>> What about the freedom to take away other people’s freedom?
> 
> The freedom to take away other people's freedom is a very serious power
> that should only be used sparingly.
> 
>> What tuple of speak would that be?
> 
> Well, if my friend has a slow internet connection, so I give him a Linux
> CD which lets him get out of Windows hell (me taking advantage of RMS's
> "freedom 2", and my friend taking advantage of RMS's "freedom 0"), and I
> don't give my friend all the source code (or a written offer) because,
> frankly, he wouldn't know what to do with the source anyway, and it
> doesn't fit on the CD, and I didn't even bother downloading the source,
> at that point I would apparently be in violation of the GPL license on
> hundreds of programs, because I would be violating what the FSF calls
> "freedom 1". 

If you used an existing Linux distribution, then the offer to provide 
source code will already be there.

If you compiled the CD yourself, and failed to provide a written offer on 
the CD, then yes absolutely you would be in violation of the licence 
terms, and shame on you.

The GPL doesn't require you to force source code on those who don't want 
it, but it does require you to make it available if they ask, and for you 
to notify them appropriately of this fact. You don't even have to 
explicitly tell your friend he can have the source code. You just have to 
make sure that the written offer is available on the disk you give him.


> Now I know none of us would ever violate the license like this, but if,
> hypothetically speaking, I had made such a CD for my friend, and then
> someone came along and explained to me that, by helping wean my friend
> from MS Windows in this fashion, I had taken away his freedom
> (specifically RMS's "freedom 1"), I would probably conclude that the
> person making this accusation was a moron


Well, yes, you probably would draw that conclusion. Doesn't mean that you 
are right to do so, because quite frankly you would have taken away your 
friend's freedom (albeit in a very small fashion). Access to the source 
code is a freedom that the GPLed software on the disk *explicitly* grants 
to your friend, and by failing to pass the offer on, you have taken away 
that freedom in a very real sense.

We are talking about a small technical violation of the licence terms 
here, but imagine if everyone did it, if Red Hat and Debian and Ubuntu 
etc didn't bother passing on the source code (or a written offer). Only a 
tiny proportion of people would discover by their own efforts that the 
source code was available, and only a proportion of them would learn 
where it was available from. The result in practical terms would be a 
major decrease in the number of people granted the freedom to modify the 
source code, and a correspondingly larger decrease in the number of 
people both free and able to modify the source code.

It's not enough to be granted freedom to modify source code in theory, if 
you know about it, if you can find some hard-to-locate website which may 
or may not be running. The practicalities are equally important. In 
theoretical terms, everyone has the freedom to legally modify and 
distribute the source code to Microsoft Windows. All you have to do is 
buy 51% of the stock so as to become majority shareholder, then make 
sufficient changes to the board of directors so that the new board grants 
you a licence to do so, then fight off the lawsuits from the rest of the 
shareholders. Anyone could do it! Not.

Another, more practical example: here in Australia our government is hell-
bent on introducing an ineffective and expensive Internet censorship 
scheme. It seems that under Australian law, it will be completely legal 
to circumvent the filter, but our government is investigating ways to 
make it illegal to tell anyone how to circumvent it. In other words, 
Australians will have permission to circumvent the nanny filter, but 
since few people will know this, or know how to do so, it will be a 
meaningless freedom.

The GPL concerns itself with the *practical* freedom to gain access to 
source code, not merely the theoretical freedom represented by permission 
without opportunity. Failure to pass on the offer to provide source code 
impacts that freedom in a very real sense.

If you can't understand this, you have the freedom to think I'm a moron, 
and I have the freedom to be sure you are one too *wink*



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


Re: Queue.Queue() AttributeError exception

2010-05-13 Thread Carl Banks
On May 12, 11:50 pm, Dennis Lee Bieber  wrote:
> On Mon, 10 May 2010 10:40:51 +0800, "ÖÓ±þÓÂ" 
> declaimed the following in gmane.comp.python.general:
>
> > I have a multi-thread program work with Queue.Queue(), sometimes put 
> > request to the work queue, but throw an exception as below traceback 
> > information, it will always throw the exception until restart program, 
> > cound please have any experience, your help will be greatly appreciated!
>
> >   File "/usr/local/lib/python2.4/Queue.py", line 71, in put
> >     self.not_full.acquire()
> > AttributeError: '_Condition' object has no attribute 'acquire'
>
>         Off hand -- I'd wonder if somewhere in the code there may be a
> faulty/erroneous rebinding of the "not_full" attribute...

My impression too, that or _Condition.


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


Re: Do any debuggers support "edit and continue?"

2010-05-13 Thread Michiel Overtoom

On 2010-05-13 00:07, Joel Koltner wrote:


Hey, a lot of people would argue that Python's lack of strong typing and
data/member protection (from one class to another) encourages sloppy
programming too.  :-)


You're being ironic, aren't you?

Python does have strong typing (many people confuse that with static 
typing), see http://www.artima.com/weblogs/viewpost.jsp?thread=7590


And for data member protection, there is the 'consenting adult' rule. 
Touch instance variables which start with an underscore on your own risk.


Greetings,

--
"Open-source projects are run by people who are self-selected to actually
care about the software, as opposed to resentful wage slaves for
whom control over their work product is minimal and development is
just another stretch of cubicle time." - ESR, http://esr.ibiblio.org
--
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message
<155f1683-9bfd-4a83-b63f-7fb0fc2f5...@g21g2000yqk.googlegroups.com>, Patrick 
Maupin wrote:

> On May 12, 10:48 pm, Lawrence D'Oliveiro
>  wrote:
>
>> In message , Ed
>> Keith wrote:
>>
>> > ... but to claim that putting more restrictions on someone give them
>> > more freedom is pure Orwellian double speak.
>>
>> What about the freedom to take away other people’s freedom?
> 
> The freedom to take away other people's freedom is a very serious
> power that should only be used sparingly.

Given that the GPL restricts that power, then it must be all right.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP 3119 ABC - And how I learned to love the Abstract Bomb

2010-05-13 Thread Lawrence D'Oliveiro
In message , Hatem 
Nassrat wrote:

> 1. To create a YajlContentHandler class that forces all sub-classers
> to implement a certain set of methods. (Great, thats what ABC is for)
> 
> 2. Conditional Abstractness! if certain methods are not implemented
> then be able to require some method to be implemented.

You’re looking at it wrong. If you want to force people to do things in a 
certain way, use Java. Python is about enabling things, not forcing them.

Don’t use subclassing. Instead, let the caller pass you a duck-typed object 
that implements the methods you need.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Django as exemplary design

2010-05-13 Thread Lawrence D'Oliveiro
In message , MRAB 
wrote:

> Albert Hopkins wrote:
>
>> On Thu, 2010-05-06 at 16:38 -0700, Patrick Maupin wrote:
>>
>>> I don't know how this applies to reading other peoples' code, but
>>> recent research shows we learn more from success than failure
>> 
>> That's good to learn, because for years I have been intentionally
>> failing in order to learn from it and become successful, and it hasn't
>> really worked out for me :|
>> 
> Failure just teaches you what you shouldn't do, not what you should...

But there are more different ways to fail than to succeed, therefore more to 
learn.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Django as exemplary design

2010-05-13 Thread Lawrence D'Oliveiro
In message , Aahz wrote:

> My suspicion is that very very few medium/large systems are truly
> "well-designed".

Conway’s law applies: the product of any human endeavour reflects the 
organizational structure that produced it. If the individuals/groups writing 
the different parts of the software were in regular communication, and 
working towards a common goal rather than at odds with each other, that will 
be reflected in the way their contributions interact.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith 
wrote:

> If, on the other hand you are releasing a library, to be incorporated into
> other products, If you release it under the GPL I will not take the time
> to learn it. I do not want to have to think about what took I can legally
> use for what job. Libraries with permissive licenses can be used in any
> project. Many contracts prohibit the use of GPL or LGPL code. So I do not
> waist my time learning to use libraries covered by restrictive licenses.
> So if you want me to even consider using your library do not use GPL, or
> LGPL.

What have you got against LGPL for this purpose?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Broken pipe

2010-05-13 Thread Lawrence D'Oliveiro
In message , Chris 
Rebert wrote:

> Also, please don't use semicolons in your code. It's bad style.

Wonder why they’re allowed, then.
-- 
http://mail.python.org/mailman/listinfo/python-list


Invoking setup.py in sub-packages

2010-05-13 Thread Francesc
Hi,

I'd like to setup a package that is make of other sub-packages,
modules and other extensions.  What I have is something like (this is
very simplified indeed):

/
__init__.py
setup.py
foo1/
__init__.py
foo1.c
[...]
foo2/
setup.py
__init__.py
foo2.c
[...]

Now, I'd like to make a setup.py for package 'foo' that is able to
compile the 'foo1' extension directly, but invoke 'foo2/setup.py' in
order to generate the 'foo2' sub-package (which contains an extension
itself).

I'm currently trying:

setup(name = "foo",
  ...
  ext_modules = [ Extension( "foo.foo1", sources=["foo1.c"] ) ],
  packages = ["foo.foo1", "foo.foo2"],
  ...
  )

Of course, the foo2 package is not made at all.  Is there a way to get
the 'foo2/setup.py' invoked automagically and generate the desired
extensions?  Or all the instructions to generate the extension in
sub-packages have to be hard-wired in main 'foo/setup.py'?

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


Re: Is there a better way to set a system clock in Python (on a Linux system)

2010-05-13 Thread Lawrence D'Oliveiro
In message , J wrote:

> Like I said, it works well, I just wonder if there is a cleaner way of
> setting the local clock to a different time in python without having
> to do all this.

How about one line in Bash:

date -s $(date --rfc-3339=date -d "+1 hour")

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


Loading C extension from memory

2010-05-13 Thread mk

Hello,

I wonder if there is a way to load C extension from in-memory object, 
not from the file on the disk?


I'm asking bc I would like to download C extensions over network and 
load them into Python interpreter (without storing the C extension in 
file on the disk).


I googled for this but there appear only methods of loading compiled 
Python (bytecode) modules.


Regards,
mk

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


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 8:38 AM
> In message ,
> Ed Keith 
> wrote:
> 
> > If, on the other hand you are releasing a library, to
> be incorporated into
> > other products, If you release it under the GPL I will
> not take the time
> > to learn it. I do not want to have to think about what
> took I can legally
> > use for what job. Libraries with permissive licenses
> can be used in any
> > project. Many contracts prohibit the use of GPL or
> LGPL code. So I do not
> > waist my time learning to use libraries covered by
> restrictive licenses.
> > So if you want me to even consider using your library
> do not use GPL, or
> > LGPL.
> 
> What have you got against LGPL for this purpose?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Most of my clients would not know how to relink a program if their life 
depended on it. And I do not want to put then in DLL hell. So I avoid the LGPL.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





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


jython and emacs on windows

2010-05-13 Thread jerome delachienne
Hello,

i am trying to start a jython interpreter from emacs on windows from
several days and did not managed to do it.
I managed to start the jython interpreter from emacs on linux
I managed to start the python interpreter from emacs on windows.
with jython on windows i have the following problem: i can execute a
python script with the option -m but i can not interact with the
interpreter.
When i start from an eshell jython without the -i  option, nothing
happens as expected (like python)
When I start from an eshell the jython interpreter with -i option,  I
receive the "welcome" information and the prompt:
c:/Users/jerome $ jython -i
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_20
Type "help", "copyright", "credits" or "license" for more information.
>>>
but then the interpreter does not react to any inputs
on the process explorer i can see that emacs has started a child
process cmd /c c:\jython2.5.1\jython.bat -i. this child process
started itself the jython interpreter which runs.but it seems that the
inputs are not passed from emacs to the jython interpreter.

has anyone an idea how i could solve this problem? Thanks for your
help !

jython 2.5.1
Jdk 1.6.0_20
emacs 22.3 and 21.3
windows xp and 7
-- 
http://mail.python.org/mailman/listinfo/python-list


indexing lists/arrays question

2010-05-13 Thread a
this must be easy but its taken me a couple of hours already

i have

a=[2,3,3,4,5,6]

i want to know the indices where a==3 (ie 1 and 2)

then i want to reference these in a

ie what i would do in IDL is

b=where(a eq 3)
a1=a(b)

any ideas?

Thanks

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


Re: indexing lists/arrays question

2010-05-13 Thread Stefan Behnel

a, 13.05.2010 16:36:

this must be easy but its taken me a couple of hours already

i have

a=[2,3,3,4,5,6]

i want to know the indices where a==3 (ie 1 and 2)


  indices = [ i for i,item in enumerate(a) if item == 3 ]



then i want to reference these in a


  print [ a[i] for i in indices ]

Stefan

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


Re: Picking a license

2010-05-13 Thread Paul Boddie
On 13 Mai, 01:36, Patrick Maupin  wrote:
>
> Once the court reaches that conclusion, it would only be a tiny step
> to find that the FSF's attempt to claim that clisp infringes the
> readline copyright to be a misuse of that same readline copyright.
> See, e.g. LaserComb v Reynolds, where the defendant (IMHO) acted much
> more egregiously than anybody who is delivering free software like
> clisp is acting, and nevertheless won on that issue.

In that very case you mention, LaserComb did not lose the copyright
protection on their work, were "free to bring an infringement suit
once it had cured the misuse" [1], and the clause which led to a
defence based on "copyright misuse" was one which forbade licensees
from making competing products.

Paul

[1] http://itlaw.wikia.com/wiki/Lasercomb_America_v._Reynolds#cite_ref-2
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: indexing lists/arrays question

2010-05-13 Thread Matthew Wilson
On Thu 13 May 2010 10:36:58 AM EDT, a wrote:
> this must be easy but its taken me a couple of hours already
>
> i have
>
> a=[2,3,3,4,5,6]
>
> i want to know the indices where a==3 (ie 1 and 2)
>
> then i want to reference these in a
>
> ie what i would do in IDL is
>
> b=where(a eq 3)
> a1=a(b)


There's several solutions.  Here's one:

It is a recipe for madness to use a list of integers and then talk
about the position of those integers, so I renamed your list to use
strings.

>>> a = ['two', 'three', 'three', 'four','five', 'six']

Now I'll use the enumerate function to iterate through each element and
get its position::

>>> for position, element in enumerate(a):
... print position, element
...
0 two
1 three
2 three
3 four
4 five
5 six

And now filter:

>>> for position, element in enumerate(a):
...if element == 'three':
...print position, element

1 three
2 three

And now do something different besides printing:

>>> b = []
>>> for position, element in enumerate(a):
... if element == 'three':
... b.append(position)

And now we can rewrite the whole thing from scratch to use a list
comprehension:

>>> [position for (position, element) in enumerate(a) if element == 'three']
[1, 2]

HTH

Matt

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


Re: indexing lists/arrays question

2010-05-13 Thread Neil Cerutti
On 2010-05-13, a  wrote:
> this must be easy but its taken me a couple of hours already
>
> i have
>
> a=[2,3,3,4,5,6]
>
> i want to know the indices where a==3 (ie 1 and 2)
>
> then i want to reference these in a
>
> ie what i would do in IDL is
>
> b=where(a eq 3)
> a1=a(b)
>
> any ideas?

For a sorted sequence the bisect module is a good start.

>>> start = bisect.bisect_left(a, 3)
>>> end = bisect.bisect_right(a, 3, bs)
>>> b = list(range(start, end))
>>> b
[1, 2]

If the list isn't necessarily sorted, try filter and enumerate.

>>> b = [a for a,b in filter(lambda x: x[1]==3, enumerate(a))]
>>> b
[1, 2]

-- 
Neil Cerutti
*** Your child was bitten by a Bat-Lizard. ***
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 2:58 am, Steven D'Aprano
 wrote:
> On Wed, 12 May 2010 22:16:29 -0700, Patrick Maupin wrote:
> > On May 12, 10:48 pm, Lawrence D'Oliveiro  > central.gen.new_zealand> wrote:
> >> In message , Ed
> >> Keith wrote:
>
> >> > ... but to claim that putting more restrictions on someone give them
> >> > more freedom is pure Orwellian double speak.
>
> >> What about the freedom to take away other people’s freedom?
>
> > The freedom to take away other people's freedom is a very serious power
> > that should only be used sparingly.
>
> >> What tuple of speak would that be?
>
> > Well, if my friend has a slow internet connection, so I give him a Linux
> > CD which lets him get out of Windows hell (me taking advantage of RMS's
> > "freedom 2", and my friend taking advantage of RMS's "freedom 0"), and I
> > don't give my friend all the source code (or a written offer) because,
> > frankly, he wouldn't know what to do with the source anyway, and it
> > doesn't fit on the CD, and I didn't even bother downloading the source,
> > at that point I would apparently be in violation of the GPL license on
> > hundreds of programs, because I would be violating what the FSF calls
> > "freedom 1".
>
> If you used an existing Linux distribution, then the offer to provide
> source code will already be there.

No, there is no written offer, e.g. with Ubuntu, simply because they
take advantage of the ability to provide a download of the source from
the same place as a download of the object.  If I download an Ubuntu
ISO, burn it and give it away (let's say I give away 100 copies, just
to remove the fair use defense), then I have violated the GPL.  I
provided chapter and verse on this; go look it up.

> If you compiled the CD yourself, and failed to provide a written offer on
> the CD, then yes absolutely you would be in violation of the licence
> terms, and shame on you.

Not relevant.

> The GPL doesn't require you to force source code on those who don't want
> it, but it does require you to make it available if they ask, and for you
> to notify them appropriately of this fact. You don't even have to
> explicitly tell your friend he can have the source code. You just have to
> make sure that the written offer is available on the disk you give him.

There is no written offer on the disk, because I burned it from
Ubuntu's repository.  It really is that simple -- if I give away
copies I've made of Ubuntu, I've violated the GPL.  Unless you can
cite some authority that tells me I'm wrong and gives real reasons.  I
actually quoted chapter and verse from the license, but you chose to
ignore that and make unsubstantiated claims.

> > Now I know none of us would ever violate the license like this, but if,
> > hypothetically speaking, I had made such a CD for my friend, and then
> > someone came along and explained to me that, by helping wean my friend
> > from MS Windows in this fashion, I had taken away his freedom
> > (specifically RMS's "freedom 1"), I would probably conclude that the
> > person making this accusation was a moron
>
> Well, yes, you probably would draw that conclusion. Doesn't mean that you
> are right to do so, because quite frankly you would have taken away your
> friend's freedom (albeit in a very small fashion). Access to the source
> code is a freedom that the GPLed software on the disk *explicitly* grants
> to your friend, and by failing to pass the offer on, you have taken away
> that freedom in a very real sense.

I was going to say "moron" but you're obviously not, so I'll change my
opinion to "brainwashed." :-)

> We are talking about a small technical violation of the licence terms
> here.

No.  It's fundamental.  The license deliberately makes not sharing the
source *the* principal way to violate it.

> but imagine if everyone did it, if Red Hat and Debian and Ubuntu
> etc didn't bother passing on the source code (or a written offer).

Then somebody else would.  How does Apache work?

> Only a
> tiny proportion of people would discover by their own efforts that the
> source code was available

No, I tell my friends that source is available, and they can come and
see me if they want to know more.  This may have been a viable
argument in 1989 (doubtful) but it's extremely silly today.

>, and only a proportion of them would learn
> where it was available from. The result in practical terms would be a
> major decrease in the number of people granted the freedom to modify the
> source code, and a correspondingly larger decrease in the number of
> people both free and able to modify the source code.

I sincerely doubt your dystopian vision, which, like the GPL and many
laws, is predicated on some outmoded views about how humans interact.

The reason some people say that the GPL protects the "freedom of the
code" is because the GPL assumes that code needs to be nurtured,
instead of taking the viewpoint that, while there may be some
freeloaders, sharing code is obviously so valuable to most of humanity
that i

Re: indexing lists/arrays question

2010-05-13 Thread Neil Cerutti
On 2010-05-13, Stefan Behnel  wrote:
> a, 13.05.2010 16:36:
>> this must be easy but its taken me a couple of hours already
>>
>> i have
>>
>> a=[2,3,3,4,5,6]
>>
>> i want to know the indices where a==3 (ie 1 and 2)
>
>indices = [ i for i,item in enumerate(a) if item == 3 ]

That form of list comprehension is preferable to my use of filter
posted elsewhere, but it didn't occur to me. Oops!

-- 
Neil Cerutti
*** Your child was bitten by a Bat-Lizard. ***
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
Consider the following scenario:

Three programmers, call them A, B & C, independently develop three different 
algorithms to perform a O(ln(n)) search. Each decide to release it for 'free'.

A decides to make it 'free', by publishing compiled object code for all major 
platforms and putting them in the public domain.

B decides to make it 'free' by publishing the source code under the GPL.

C decides to make it 'free' by publishing the source code under the Boost 
license.

Which library should be incorporated into the next Python release?, and why?

I vote for C, but would like to hear any arguments for another position.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




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


Re: indexing lists/arrays question

2010-05-13 Thread Tim Chase

On 05/13/2010 09:36 AM, a wrote:

this must be easy but its taken me a couple of hours already

i have

a=[2,3,3,4,5,6]

i want to know the indices where a==3 (ie 1 and 2)


indexes = [i for (i, v) in enumerate(a) where v==3]


then i want to reference these in a


In a _what_?  You can then do things like

  for i in indexes:
print a[i]

(but you already know these are "3", so it's not very exciting...)

-tkc


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


Re: indexing lists/arrays question

2010-05-13 Thread a
On 13 May, 15:47, Stefan Behnel  wrote:
> a, 13.05.2010 16:36:
>
> > this must be easy but its taken me a couple of hours already
>
> > i have
>
> > a=[2,3,3,4,5,6]
>
> > i want to know the indices where a==3 (ie 1 and 2)
>
>    indices = [ i for i,item in enumerate(a) if item == 3 ]
>
> > then i want to reference these in a
>
>    print [ a[i] for i in indices ]
>
> Stefan

thanks Stefan.  very useful.  I didn't get this from the python
documentation!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 7:25 am, Lawrence D'Oliveiro  wrote:
> In message
> <155f1683-9bfd-4a83-b63f-7fb0fc2f5...@g21g2000yqk.googlegroups.com>, Patrick
>
> Maupin wrote:
> > On May 12, 10:48 pm, Lawrence D'Oliveiro
> >  wrote:
>
> >> In message , Ed
> >> Keith wrote:
>
> >> > ... but to claim that putting more restrictions on someone give them
> >> > more freedom is pure Orwellian double speak.
>
> >> What about the freedom to take away other people’s freedom?
>
> > The freedom to take away other people's freedom is a very serious
> > power that should only be used sparingly.
>
> Given that the GPL restricts that power, then it must be all right.

But the freedom to take away other people's freedom to take away other
people's freedom is an even *more* serious power (as many communities
which have straight-jacketed their law enforcement officers have found
out), that should be used *very sparingly*, so your conclusion doesn't
necessarily follow.

Regards,
Pat

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


Re: client to upload big files via https and get progress info

2010-05-13 Thread Aahz
In article <[email protected]>,
News123   wrote:
>
>I'd like to perform huge file uploads via https.
>I'd like to make sure,
>- that I can obtain upload progress info (sometimes the nw is very slow)
>- that (if the file exceeds a certain size) I don't have to
>  read the entire file into RAM.

Based on my experience with this, you really need to send multiple
requests (i.e. "chunking").  There are ways around this (you can look
into curl's resumable uploads), but you will need to maintain state no
matter what, and I think that chunking is the best/simplest.
-- 
Aahz ([email protected])   <*> http://www.pythoncraft.com/

f u cn rd ths, u cn gt a gd jb n nx prgrmmng.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: indexing lists/arrays question

2010-05-13 Thread a
On 13 May, 16:19, Tim Chase  wrote:
> On 05/13/2010 09:36 AM, a wrote:
>
> > this must be easy but its taken me a couple of hours already
>
> > i have
>
> > a=[2,3,3,4,5,6]
>
> > i want to know the indices where a==3 (ie 1 and 2)
>
> indexes = [i for (i, v) in enumerate(a) where v==3]
>
> > then i want to reference these in a
>
> In a _what_?  You can then do things like
>
>    for i in indexes:
>      print a[i]
>
> (but you already know these are "3", so it's not very exciting...)
>
> -tkc

really its to get the indexes in 1 array where something equals
something then reference these in another array.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 9:53 am, Paul Boddie  wrote:
> On 13 Mai, 01:36, Patrick Maupin  wrote:
>
>
>
> > Once the court reaches that conclusion, it would only be a tiny step
> > to find that the FSF's attempt to claim that clisp infringes the
> > readline copyright to be a misuse of that same readline copyright.
> > See, e.g. LaserComb v Reynolds, where the defendant (IMHO) acted much
> > more egregiously than anybody who is delivering free software like
> > clisp is acting, and nevertheless won on that issue.
>
> In that very case you mention, LaserComb did not lose the copyright
> protection on their work, were "free to bring an infringement suit
> once it had cured the misuse" [1], and the clause which led to a
> defence based on "copyright misuse" was one which forbade licensees
> from making competing products.

Yes.  You make 3 points here, which I will address in order

1) They did not lose the copyright protection on their work.

To be clear, what I meant by losing copyright protection is not at all
the same as losing the copyright itself.  The loss of protections
simply means that you can't necessarily prevail in a lawsuit for
infringement against people who infringed while you were misusing the
copyright.  This could be true, even if while the copyright was being
misused, RMS attempted to sue someone else, and even if he had a solid
case.  From Lasercomb:  "However, again analogizing to patent misuse,
the defense of copyright misuse is available even if the defendants
themselves have not been injured by the misuse."  So, during the time
of the misuse, yes, they lost their copyright protections, but the
loss was only temporary and could be cured going forward by not
overreaching in their license agreement.

2) "Were free to bring an infringement suit once they cured the
misuse."

Yes, if you read the actual footnote you are referencing, it cites
United States Gypsum Co. v National Gypsum Co., which was a patent
case.  In that case, there was a price-fixing cartel based on patents,
and the cartel lost its ability to use the patents until they changed
their illegal patent licensing scheme.  Once they changed how they
licensed their patents to the court's satisfaction, they were then
free to go after patent infringers.  BUT, only for infringements that
occurred *after* they cured the infringement.  Curing the infringement
is not a magic wand that allows you a mulligan for your original cause
of action, otherwise the patent/copyright misuse defense would be
meaningless.

3) and the clause which led to a defence based on "copyright misuse"
was one which forbade licensees from making competing products.

Yes, but if you read the reasoning in the decision, almost any attempt
to stretch a copyright (or patent) to cover things it doesn't really
cover could be viewed as a misuse.  So, to the extent that the GPL
claims that the distribution of something that links to readline
violates readline's copyright by being a derivative work, if a court
finds this to be untrue, it could also find that the readline
copyright was being misused, at least until the license were modified
to make it clear that distributing a program that could use readline
(without distributing readline) did not impose any specific licensing
requirements on the readline-using program.

To follow this logic, all you have to do is to read the LaserComb
decision very carefully (it analogizes copyright misuse to patent
misuse), and then read the myriad ways it is possible to misuse
patents.

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


Re: client to upload big files via https and get progress info

2010-05-13 Thread James Mills
On Wed, May 12, 2010 at 6:48 PM, News123  wrote:
> Hi,
>
> I'd like to perform huge file uploads via https.
> I'd like to make sure,
> - that I can obtain upload progress info (sometimes the nw is very slow)
> - that (if the file exceeds a certain size) I don't have to
>  read the entire file into RAM.
>
> I found Active states recipe 146306, which constructs the whole
> multipart message first in RAM and sends it then in one chunk.
>
>
> I found a server side solutions, that will write out the data file chunk
> wise ( http://webpython.codepoint.net/mod_python_publisher_big_file_upload
> )
>
>
>
> If I just wanted to have progress info, then I could probably
> just split line 16 of Active State's recipe ( h.send(body) )
> into multiple send, right?
>
> chunksize = 1024
> for i in range(0,len(body),chunksize):
>    h.send(body[i:i+chunksize])
>    show_progressinfo()
>
>
> But how could I create body step by step?
> I wouldn't know the content-length up front?
>
> thanks in advance

My suggestion is to find some tools that can
send multiple chucks of data. A non-blocking
i/o library/tool might be useful here (eg: twisted or similar).

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


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Wed, 5/12/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Wednesday, May 12, 2010, 11:48 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > ... but to claim that putting more restrictions on
> someone give them more
> > freedom is pure Orwellian double speak.
> 
> What about the freedom to take away other people’s
> freedom? What tuple of 
> speak would that be?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Assertion I:
   If person A is free to do more than person B, then person A has 
   more freedom then person B.

Assertion II:
   If person A is free do perform an action person B is not free to 
   perform then person A is free to do more than person B.

Assertion III:
  If person B is restricted in some way that person A is not them Person A 
  is free to do something Person B is not free to do.

Conclusion:
  If person B is more resticted than Peston A, Person A has mor freedom
  than person B.

Which step in this reasoning do you disagree with?

 -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





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


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 8:25 AM
> In message
> <155f1683-9bfd-4a83-b63f-7fb0fc2f5...@g21g2000yqk.googlegroups.com>,
> Patrick 
> Maupin wrote:
> 
> > On May 12, 10:48 pm, Lawrence D'Oliveiro
> > 
> wrote:
> >
> >> In message ,
> Ed
> >> Keith wrote:
> >>
> >> > ... but to claim that putting more
> restrictions on someone give them
> >> > more freedom is pure Orwellian double speak.
> >>
> >> What about the freedom to take away other
> people’s freedom?
> > 
> > The freedom to take away other people's freedom is a
> very serious
> > power that should only be used sparingly.
> 
> Given that the GPL restricts that power, then it must be
> all right.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

I do not think anyone is claiming it is not 'all right'. The claim is being 
made that it restricts freedom.

You are free to put any restrictions you want on your software. If you use the 
GPL on a library I will not use it because I need to make a living. I do not 
dispute your right to use the GPL. I just dispute your claim that you use it to 
give me 'more freedom'.

I do not know what your reason for using the GPL is, but most of the people I 
know who use it do so so that can charge a license fee to people who want to 
use the code with out the restrictions of the GPL. They do this so they can 
make a living, which is their right, and I do not hold it against them. If I 
ever develop a library I think people would be willing to pay to license, I'd 
to the same.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





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


Re: Picking a license

2010-05-13 Thread Paul Boddie
On 13 Mai, 01:58, Patrick Maupin  wrote:
> On May 12, 6:15 pm, Paul Boddie  wrote:
> > Right. The "full cost" of software that probably cost them nothing
> > monetarily and which comes with all the sources, some through a chain
> > of distribution and improvement which could have led to proprietary
> > software had the earliest stages in the chain involved permissive
> > licensing. And that they can't sell a binary-only Ubuntu derivative.
>
> Who's talking about selling a binary-only version -- there is a good
> chance they can't even give away a binary CD without violating
> copyright.

People only have to honour requests for the corresponding source if
asked for it. They are not violating copyright by default. If you
think Ubuntu are exposing people to legal peril by advocating that
people make copies of Ubuntu for their friends, why don't you tell
Mark Shuttleworth about it?

[...]

> > So, the "negative consequences" are that people can't make proprietary
> > editions of some software. When that's a deliberate choice in the
> > design of a licence, there's no pretending that the consequences
> > aren't there, just that they aren't perceived by everyone to be
> > negative.
>
> I gave an example earlier of svglib and rst2pdf.  Negative
> consequences.  Nothing proprietary involved.

Negative consequences for people who don't want to touch GPL-licensed
software and who reserve the right to make proprietary versions of
rst2pdf.

[...]

> > Well, you effectively said that you didn't like being asked to "share
> > alike", which is what the GPL achieves.
>
> I give away lots of software.  Free to all comers.  Come and get some.

Yes, but you don't insist that people "share alike". I don't demand
that you insist that, either, but you clearly object to other people
putting that condition on their own works.

> > so why should I not assume
> > that you generally object to other, more obviously labelled licences
> > like the CC-*-SA licences which make it clear what is expected of that
> > hapless recipient of a work who doesn't bother reading the licence?
>
> Your assumptions are so far away from reality that there is really no
> good reason why you shouldn't assume that I'm a 10 foot tall purple
> monster.

Then you've done a very bad job communicating them. Laying off the
bizarre imagery might help remedy that somewhat.

[...]

> > Yes, but you have to choose to do something ("X") to start with. Which
> > is actually what you wrote later in that exchange:
>
> > "Again, the force is applied once you choose to do a particular thing
> > with the software -- is is really that hard to understand that
> > concept?"
>
> I didn't just write that later.  I wrote it in my very first post,
> which you just quoted a few lines up, apparently without even
> bothering to read it closely.

I did read it closely. Now read your own comment closely and take
particular notice of the word "choose".

[...]

> So, the FSF, which so carefully provides the most legalese-ish license
> on the planet, which was in development for god-knows-how-long, which

Have you read the Mozilla Public License? Have you read through Sun's
JDK licence? You were complaining about Microsoft licensing earlier:
have you read those licences through to the end? (There are people who
refuse to accept them, incidentally, and are then refused any kind of
refund for the product. Next you'll be claiming that the FSF's
indiscretions are on the same level as this particular Microsoft-plus-
vendor scam, and yet accuse me of a lack of a sense of perspective.)

> maintains a carefully parsed FAQ of what you can and can't do, which
> engages in all sorts of advocacy, can't find the time to explain to
> Ubuntu that they really ought to explain how the licensing works on
> their download page?

I think Ubuntu can maybe see the case for moving their notice on their
"legal" page to the download page if you can make it successfully. Or
is your point that people have to be "warned" about that inconvenient
GPL licence?

> What have you been smoking and where can I get some?

Yes, always ready with a pertinent response, I see.

[...]

> > I never said there was. I said that if you don't like the licence,
> > don't incorporate works which use it into your own projects.
>
> No, you said "If you don't like them, don't use GPL-licensed
> software."

In the context of developing and redistributing it. If you hate the
GPL so much, you might not feel comfortable even using the software,
either, but that's up to you. You're the one with the problem with the
GPL.

> > But don't
> > say that it's not fair that people are releasing stuff under terms you
> > don't like, or say that they're being "pathetic" or petty or
> > ridiculous by doing so, or are imposing their agenda on you.
>
> The only time I mentioned pathetic and petty were for really small
> libraries, which probably wouldn't merit copyright protection in any
> case.

And for you, libraries like readline are apparently not rea

Re: Broken pipe

2010-05-13 Thread Lie Ryan
On 05/13/10 22:41, Lawrence D'Oliveiro wrote:
> In message , Chris 
> Rebert wrote:
> 
>> Also, please don't use semicolons in your code. It's bad style.
> 
> Wonder why they’re allowed, then.

they're there for line continuation, e.g.:

a = 40; foo(a)

but in many cases, putting two statements in a single line reduces
readability so use the semicolons extremely conservatively. But the
worst is the abuse of semicolons for end-of-line markers.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: client to upload big files via https and get progress info

2010-05-13 Thread News123
Hi Aaaz,

Aahz wrote:
> In article <[email protected]>,
> News123   wrote:
>> I'd like to perform huge file uploads via https.
>> I'd like to make sure,
>> - that I can obtain upload progress info (sometimes the nw is very slow)
>> - that (if the file exceeds a certain size) I don't have to
>>  read the entire file into RAM.
> 
> Based on my experience with this, you really need to send multiple
> requests (i.e. "chunking").  There are ways around this (you can look
> into curl's resumable uploads), but you will need to maintain state no
> matter what, and I think that chunking is the best/simplest.
I agree I need  chunking. (the question is just on which level of the
protocol)

I just don't know how to make a chunkwise file upload or what library is
best.

Can you recommend any libraries or do you have a link to an example?


I'd like to avoid to make separate https post requests for the chunks
(at least if the underlying module does NOT support keep-alive connections)


I made some tests with high level chunking (separate sequential https
post requests).
What I noticed is a rather high penalty in data throughput.
The reason is probably, that each request makes its own https connection
and that either the NW driver or the TCP/IP stack doesn't allocate
enough band width to my request.

Therefore I'd like to do the chunking on a 'lower' level.
One option would be to have a https module, which supports keep-alive,

the other would be  to have a library, which creates a http post body
chunk by chunk.


What do others do for huge file uploads
The uploader might be connected via ethernet, WLAN, UMTS, EDGE, GPRS. )

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


Re: indexing lists/arrays question

2010-05-13 Thread Carey Tilden
On Thu, May 13, 2010 at 8:45 AM, a  wrote:
> On 13 May, 16:19, Tim Chase  wrote:
>> On 05/13/2010 09:36 AM, a wrote:
>>
>> > this must be easy but its taken me a couple of hours already
>>
>> > i have
>>
>> > a=[2,3,3,4,5,6]
>>
>> > i want to know the indices where a==3 (ie 1 and 2)
>>
>> indexes = [i for (i, v) in enumerate(a) where v==3]
>>
>> > then i want to reference these in a
>>
>> In a _what_?  You can then do things like
>>
>>    for i in indexes:
>>      print a[i]
>>
>> (but you already know these are "3", so it's not very exciting...)
>>
>> -tkc
>
> really its to get the indexes in 1 array where something equals
> something then reference these in another array.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Out of curiosity, why are you using two arrays?  Have you considered a
dict?  There are of course good reasons not to use a dict in this
situation, but you haven't said one way or another.

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


Re: indexing lists/arrays question

2010-05-13 Thread Tim Chase

On 05/13/2010 10:45 AM, a wrote:

a=[2,3,3,4,5,6]



i want to know the indices where a==3 (ie 1 and 2)


indexes = [i for (i, v) in enumerate(a) where v==3]


then i want to reference these in a


In a _what_?  You can then do things like

for i in indexes:
  print a[i]

(but you already know these are "3", so it's not very exciting...)

-tkc


really its to get the indexes in 1 array where something equals
something then reference these in another array.


If your two arrays are of the same length, you can do things like

  a = [2,3,3,4,5,6]
  b = ['a', 'b', 'c', 'd', 'e', 'f']

  print [m for (n,m) in zip(a,b) if n == 3]

and skip the indexes altogether.

-tkc




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


Re: indexing lists/arrays question

2010-05-13 Thread a
On 13 May, 17:41, Carey Tilden  wrote:
> On Thu, May 13, 2010 at 8:45 AM, a  
> wrote:
> > On 13 May, 16:19, Tim Chase  wrote:
> >> On 05/13/2010 09:36 AM, a wrote:
>
> >> > this must be easy but its taken me a couple of hours already
>
> >> > i have
>
> >> > a=[2,3,3,4,5,6]
>
> >> > i want to know the indices where a==3 (ie 1 and 2)
>
> >> indexes = [i for (i, v) in enumerate(a) where v==3]
>
> >> > then i want to reference these in a
>
> >> In a _what_?  You can then do things like
>
> >>    for i in indexes:
> >>      print a[i]
>
> >> (but you already know these are "3", so it's not very exciting...)
>
> >> -tkc
>
> > really its to get the indexes in 1 array where something equals
> > something then reference these in another array.
> > --
> >http://mail.python.org/mailman/listinfo/python-list
>
> Out of curiosity, why are you using two arrays?  Have you considered a
> dict?  There are of course good reasons not to use a dict in this
> situation, but you haven't said one way or another.
>
> Carey

i am reading a 2,n array from one website, column1=times,
column2=values
then another 2,n array from another website, column1=times,
column2=values

the times are different but may (or may not) coincide in places

i need to make a 3rd array, 2,n where the first column are column2
values from array1 and the second column are column2 values from array
2 #where the timestamps agree#

i'm an idl programmer and doing this would be second nature but i need
to make an application which does something along the lines of the
above then plots column2 vs column2 for the above array3 (plus some
other maths).  needs to be non-proprietary and work on different
platforms.  i just started with python, not even sure if it's the best
thing.  the plotting routines seem not to come wrapped with standard
python which is a bit of a pain.

the routine i use most in idl is 'where' and though i managed to write
a def which worked, i couldn't then dereference the list of those
indexes.  i'm a bit old to be learning new languages

thanks for your help!

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


Re: indexing lists/arrays question

2010-05-13 Thread a
On 13 May, 18:18, Tim Chase  wrote:
> On 05/13/2010 10:45 AM, a wrote:
>
>
>
>
>
> >>> a=[2,3,3,4,5,6]
>
> >>> i want to know the indices where a==3 (ie 1 and 2)
>
> >> indexes = [i for (i, v) in enumerate(a) where v==3]
>
> >>> then i want to reference these in a
>
> >> In a _what_?  You can then do things like
>
> >>     for i in indexes:
> >>       print a[i]
>
> >> (but you already know these are "3", so it's not very exciting...)
>
> >> -tkc
>
> > really its to get the indexes in 1 array where something equals
> > something then reference these in another array.
>
> If your two arrays are of the same length, you can do things like
>
>    a = [2,3,3,4,5,6]
>    b = ['a', 'b', 'c', 'd', 'e', 'f']
>
>    print [m for (n,m) in zip(a,b) if n == 3]
>
> and skip the indexes altogether.
>
> -tkc

mmm, that's clever, thanks.  although i don't know why it works yet.
at least i found a good user group!
-- 
http://mail.python.org/mailman/listinfo/python-list


walk directory & ignore all files/directories begin with '.'

2010-05-13 Thread albert kao
I want to walk a directory and ignore all the files or directories
which names begin in '.' (e.g. '.svn').
Then I will process all the files.
My test program walknodot.py does not do the job yet.
Python version is 3.1 on windows XP.
Please help.

[code]
#!c:/Python31/python.exe -u
import os
import re

path = "C:\\test\\com.comp.hw.prod.proj.war\\bin"
for dirpath, dirs, files in os.walk(path):
print ("dirpath " + dirpath)
p = re.compile('\\\.(\w)+$')
if p.match(dirpath):
continue
print ("dirpath " + dirpath)
for dir in dirs:
print ("dir " + dir)
if dir.startswith('.'):
continue

print (files)
for filename in files:
print ("filename " + filename)
if filename.startswith('.'):
continue
print ("dirpath filename " + dirpath + "\\" + filename)
# process the files here
[/code]

C:\python>walknodot.py
dirpath C:\test\com.comp.hw.prod.proj.war\bin
dirpath C:\test\com.comp.hw.prod.proj.war\bin
dir .svn
dir com
[]
dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
...

I do not expect C:\test\com.comp.hw.prod.proj.war\bin\.svn to appear
twice.
Please help.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: walk directory & ignore all files/directories begin with '.'

2010-05-13 Thread MRAB

albert kao wrote:

I want to walk a directory and ignore all the files or directories
which names begin in '.' (e.g. '.svn').
Then I will process all the files.
My test program walknodot.py does not do the job yet.
Python version is 3.1 on windows XP.
Please help.

[code]
#!c:/Python31/python.exe -u
import os
import re

path = "C:\\test\\com.comp.hw.prod.proj.war\\bin"
for dirpath, dirs, files in os.walk(path):
print ("dirpath " + dirpath)
p = re.compile('\\\.(\w)+$')
if p.match(dirpath):
continue
print ("dirpath " + dirpath)
for dir in dirs:
print ("dir " + dir)
if dir.startswith('.'):
continue

print (files)
for filename in files:
print ("filename " + filename)
if filename.startswith('.'):
continue
print ("dirpath filename " + dirpath + "\\" + filename)
# process the files here
[/code]

C:\python>walknodot.py
dirpath C:\test\com.comp.hw.prod.proj.war\bin
dirpath C:\test\com.comp.hw.prod.proj.war\bin
dir .svn
dir com
[]
dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
...

I do not expect C:\test\com.comp.hw.prod.proj.war\bin\.svn to appear
twice.
Please help.


The problem is with your use of the 'match' method, which will look for 
a match only at the start of the string. You need to use the 'search'

method instead.

The regular expression is also incorrect. The string literal:

'\\\.(\w)+$'

passes the characters:

\\.(\w)+$

to the re module as the regular expression, which will match a
backslash, then any character, then a word, then the end of the string.
What you want is:

\\\.\w+$

(you don't need the parentheses) which is best expressed as the 'raw'
string literal:

r'\\\.\w+$'
--
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 11:19 am, Paul Boddie  wrote:
> People only have to honour requests for the corresponding source if
> asked for it. They are not violating copyright by default.

Well, the gospel according to the FSF says otherwise:

http://www.gnu.org/licenses/gpl-faq.html#UnchangedJustBinary

> If you
> think Ubuntu are exposing people to legal peril by advocating that
> people make copies of Ubuntu for their friends, why don't you tell
> Mark Shuttleworth about it?

Because I don't really think the peril is real -- a) nobody's going to
sue because of the negative PR consequences; and b) fair use would nip
the lawsuit in the bud.  In fact, the very *lack* of warning on the
Ubuntu site would help the end user in the lawsuit.

> Negative consequences for people who don't want to touch GPL-licensed
> software and who reserve the right to make proprietary versions of
> rst2pdf.

Negative consequences for people who don't want to tell other people
what to do.

> > > Well, you effectively said that you didn't like being asked to "share
> > > alike", which is what the GPL achieves.
>
> > I give away lots of software.  Free to all comers.  Come and get some.
>
> Yes, but you don't insist that people "share alike". I don't demand
> that you insist that, either, but you clearly object to other people
> putting that condition on their own works.

You're still not paying attention.  I think it's fine if people want
to do that, but I still think there is "force" involved, and that it
is not the best solution for all situations.  I also believe that
legally, the GPL license tries to overreach in its control of other
people's software, but that morally that may not matter, because the
intentions of the license's author are clear.

> > Your assumptions are so far away from reality that there is really no
> > good reason why you shouldn't assume that I'm a 10 foot tall purple
> > monster.
>
> Then you've done a very bad job communicating them. Laying off the
> bizarre imagery might help remedy that somewhat.

I didn't start off with bizarre imagery.  That only came about when
people started trying to use really lame excuses about why my initial
statement was wrong.
>
> [...]
>
> > > Yes, but you have to choose to do something ("X") to start with. Which
> > > is actually what you wrote later in that exchange:
>
> > > "Again, the force is applied once you choose to do a particular thing
> > > with the software -- is is really that hard to understand that
> > > concept?"
>
> > I didn't just write that later.  I wrote it in my very first post,
> > which you just quoted a few lines up, apparently without even
> > bothering to read it closely.
>
> I did read it closely. Now read your own comment closely and take
> particular notice of the word "choose".

In my initial post, I mentioned that the force kicks in "once the
decision is made..."  That implies a choice.  Knowingly or not, you
have finally acknowledged that my initial post on this issue is
reasonably accurate, but even in so doing, you keep pointing to
specific words there to try to show that I'm contradicting myself.
Which, if I am, is only because I'm overreaching to try to combat the
overreaching on the other side.  I fully stand by my first post on
this issue, and most of the posting since then has been to correct
misunderstandings and apparently willful misinterpretations of that.

> I think Ubuntu can maybe see the case for moving their notice on their
> "legal" page to the download page if you can make it successfully.

The point, which I have made in another post, is that a fairly normal
way of acquiring Ubuntu -- giving a friend a CD -- violates the GPL as
written, and this is by design.  The goal is to get more free software
users even if they are abusing the license, and only punish those who
are abusing the license in particular ways.  BTW, there is nothing
even on Ubuntu's legal page warning about this possible consequence
for sharing a CD, or at least not in a very clear fashion.

> Or
> is your point that people have to be "warned" about that inconvenient
> GPL licence?

I don't think that would be a bad idea at all.  Say what you want
about Microsoft; if you install Windows, their software is quick to
explain all the licensing terms in gory detail.  Mind you, even that's
not really in English, but they get more points for the attempt than
Ubuntu.

> > What have you been smoking and where can I get some?
>
> Yes, always ready with a pertinent response, I see.

I am ready with pertinent responses to well thought-out arguments, and
with impertinent responses to silly arguments.  From a practical
perspective, Microsoft turning a blind eye to increase market share,
and GPL authors turning a blind eye to increase market share and/or
goodwill are identical.  The fact that money is involved in one
instance and not in the other is immaterial.  The fact that you
believe in the goals of one and not the goals of the other is
immaterial.  The true fact is that, in both c

Re: walk directory & ignore all files/directories begin with '.'

2010-05-13 Thread albert kao
On May 13, 3:10 pm, MRAB  wrote:
> albert kao wrote:
> > I want to walk a directory and ignore all the files or directories
> > which names begin in '.' (e.g. '.svn').
> > Then I will process all the files.
> > My test program walknodot.py does not do the job yet.
> > Python version is 3.1 on windows XP.
> > Please help.
>
> > [code]
> > #!c:/Python31/python.exe -u
> > import os
> > import re
>
> > path = "C:\\test\\com.comp.hw.prod.proj.war\\bin"
> > for dirpath, dirs, files in os.walk(path):
> >     print ("dirpath " + dirpath)
> >     p = re.compile('\\\.(\w)+$')
> >     if p.match(dirpath):
> >         continue
> >     print ("dirpath " + dirpath)
> >     for dir in dirs:
> >         print ("dir " + dir)
> >         if dir.startswith('.'):
> >             continue
>
> >         print (files)
> >         for filename in files:
> >             print ("filename " + filename)
> >             if filename.startswith('.'):
> >                 continue
> >             print ("dirpath filename " + dirpath + "\\" + filename)
> >                # process the files here
> > [/code]
>
> > C:\python>walknodot.py
> > dirpath C:\test\com.comp.hw.prod.proj.war\bin
> > dirpath C:\test\com.comp.hw.prod.proj.war\bin
> > dir .svn
> > dir com
> > []
> > dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
> > dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
> > ...
>
> > I do not expect C:\test\com.comp.hw.prod.proj.war\bin\.svn to appear
> > twice.
> > Please help.
>
> The problem is with your use of the 'match' method, which will look for
> a match only at the start of the string. You need to use the 'search'
> method instead.
>
> The regular expression is also incorrect. The string literal:
>
>      '\\\.(\w)+$'
>
> passes the characters:
>
>      \\.(\w)+$
>
> to the re module as the regular expression, which will match a
> backslash, then any character, then a word, then the end of the string.
> What you want is:
>
>      \\\.\w+$
>
> (you don't need the parentheses) which is best expressed as the 'raw'
> string literal:
>
>      r'\\\.\w+$'
Following your advice and add the case for C:\test
\com.comp.hw.prod.proj.war\bin\.svn\tmp
p = re.compile(r'\\\.\w+$')
if p.search(dirpath):
continue
p = re.compile(r'\\\.\w+\\')
if p.search(dirpath):
continue

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


use only files but ignore directories on Windows

2010-05-13 Thread albert kao
My program plan to use only files but ignore directories on Windows.
I google but do not find some functions like
bool isFile(string)
bool isDirectory(string)
Please help.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: use only files but ignore directories on Windows

2010-05-13 Thread Jerry Hill
On Thu, May 13, 2010 at 4:12 PM, albert kao  wrote:
> My program plan to use only files but ignore directories on Windows.
> I google but do not find some functions like
> bool isFile(string)
> bool isDirectory(string)
> Please help.

You're looking for the functions os.path.isfile() and os.path.isdir()

See http://docs.python.org/library/os.path.html for details.

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


Re: use only files but ignore directories on Windows

2010-05-13 Thread James Mills
On Fri, May 14, 2010 at 6:12 AM, albert kao  wrote:
> My program plan to use only files but ignore directories on Windows.
> I google but do not find some functions like
> bool isFile(string)
> bool isDirectory(string)
> Please help.

Try looking up the os module.

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


stopping execution window on error - newbie

2010-05-13 Thread a
I'm coding on an old windows laptop

i write the code and double click the icon.  it runs the program and
writes results to a window.

when the code finishes, the window closes, i do a time.sleep(10) to
see what has happened.

unfortunately when there is an error it just closes the window.
anyway of seeing the error messages?

thanks

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


Re: stopping execution window on error - newbie

2010-05-13 Thread Matteo Landi
Place a try .. except surrounding the body of your program, and finally call
the input() function.

On Thu, May 13, 2010 at 11:00 PM, a wrote:

> I'm coding on an old windows laptop
>
> i write the code and double click the icon.  it runs the program and
> writes results to a window.
>
> when the code finishes, the window closes, i do a time.sleep(10) to
> see what has happened.
>
> unfortunately when there is an error it just closes the window.
> anyway of seeing the error messages?
>
> thanks
>
> a
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Matteo Landi
http://www.matteolandi.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Tkinter - paste from clipboard not working

2010-05-13 Thread puzzler
I have written a very simple GUI in Python / Tkinter, running under
Python 2.5.4 on Windows.

The GUI is essentially a big Tix.ScrolledText area, where you can
enter some text, and a button underneath to process the text.  (The
button causes the text to be looked up in a SQLite database, and some
stats are generated and displayed in a web browser).

One of my users is reporting to me that intermittently, he loses the
ability to paste text into the Tix.ScrolledText area.  He says that
copy and paste works in all his other applications, but suddenly it
will not work in my app's text widget.  Even weirder, he says that
once the ability to paste goes away, it will not work *until he
reboots his computer*.

Even if there's some sort of bug with my app, I can't think of any way
that this problem could persist across stopping and starting the
program.  Seems like restarting the program should put things back
into a pristine state.  So I'm beginning to wonder if there's some
sort of deeper bug with Tkinter or Tix?  How could this bug persist
until a reboot?  Does Python run some background service to handle Tk
calls that remains running across Python instantiations?

Any ideas or suggestions would be most appreciated.  Thanks!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: stopping execution window on error - newbie

2010-05-13 Thread Mensanator
On May 13, 4:00 pm, a  wrote:
> I'm coding on an old windows laptop
>
> i write the code and double click the icon.  

Don't do that.

> it runs the program and
> writes results to a window.
>
> when the code finishes, the window closes, i do a time.sleep(10) to
> see what has happened.
>
> unfortunately when there is an error it just closes the window.
> anyway of seeing the error messages?

Go to the windows [Start] button. Select [Run...] and in the popup
box,
type "cmd" as the program to run. This will open a DOS shell window (a
text window.)

Then you can run your Python script from the window prompt and it
won't
close until you manually close it, even if the program crashes.

For example, once I open the DOS shell...


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\>C:

C:\>cd python31\user\lotto

C:\Python31\user\lotto>dir
 Volume in drive C has no label.
 Volume Serial Number is 06DE-55B4

 Directory of C:\Python31\user\lotto

05/13/2010  05:53 PM  .
05/13/2010  05:53 PM  ..
08/19/2009  07:08 PM 3,334 lotto.py
05/13/2010  05:56 PM 6,068 lotto_2010.py
   2 File(s)  9,402 bytes
   2 Dir(s)  102,247,440,384 bytes free

C:\Python31\user\lotto>..\..\python lotto_2010.py

{1: 2, 2: 3, 3: 2, 4: 1, 5: 2, 6: 1, 7: 2, 8: 1, 9: 1, 10: 2, 11: 2,
13: 1, 14: 2, 17: 1, 18: 2, 19: 1, 20: 1, 21: 1, 22: 1, 24: 1, 25: 1,
26: 3, 27: 1, 28: 2, 29: 2, 30: 1, 31: 1, 32: 1, 34: 1, 35: 1, 37: 2,
38: 2, 39: 2, 40: 1, 42: 2, 43: 1, 44: 2, 46: 2, 47: 1, 48: 1, 50: 1,
51: 2, 52: 3}

 1  2 **
 2  3 ***
 3  2 **
 4  1 *
 5  2 **
 6  1 *
 7  2 **
 8  1 *
 9  1 *
10  2 **
11  2 **
12
13  1 *
14  2 **
15
16
17  1 *
18  2 **
19  1 *
20  1 *
21  1 *
22  1 *
23
24  1 *
25  1 *
26  3 ***
27  1 *
28  2 **
29  2 **
30  1 *
31  1 *
32  1 *
33
34  1 *
35  1 *
36
37  2 **
38  2 **
39  2 **
40  1 *
41
42  2 **
43  1 *
44  2 **
45
46  2 **
47  1 *
48  1 *
49
50  1 *
51  2 **
52  3 ***


(7, 21, 50, 36, 26, 3)
(7, 21, 50, 36, 26, 17)
(7, 21, 50, 36, 26, 52)
(7, 21, 50, 36, 3, 17)
(7, 21, 50, 36, 3, 52)
(7, 21, 50, 36, 17, 52)
(7, 21, 50, 26, 3, 17)
(7, 21, 50, 26, 3, 52)
(7, 21, 50, 26, 17, 52)
(7, 21, 50, 3, 17, 52)
(7, 21, 36, 26, 3, 17)
(7, 21, 36, 26, 3, 52)
(7, 21, 36, 26, 17, 52)
(7, 21, 36, 3, 17, 52)
(7, 21, 26, 3, 17, 52)
(7, 50, 36, 26, 3, 17)
(7, 50, 36, 26, 3, 52)
(7, 50, 36, 26, 17, 52)
(7, 50, 36, 3, 17, 52)
(7, 50, 26, 3, 17, 52)
(7, 36, 26, 3, 17, 52)
(21, 50, 36, 26, 3, 17)
(21, 50, 36, 26, 3, 52)
(21, 50, 36, 26, 17, 52)
(21, 50, 36, 3, 17, 52)
(21, 50, 26, 3, 17, 52)
(21, 36, 26, 3, 17, 52)
(50, 36, 26, 3, 17, 52)


 8  9 32 38 40 48
13 22 28 39 42 43
 1  2  5 11 18 52 +
 2  3 26 44 51 52 +++
 4  7 14 26 35 52 +++
 2  7 10 19 42 47 +
 5 20 31 34 50 51 +
 1 28 29 37 39 46
10 11 27 37 38 46
 6 21 24 29 30 44 +
 3 14 17 18 25 26 +++
 7 10 39 42 45 46 +
15 17 23 36 38 44 ++
16 19 23 27 41 49
15 25 32 36 44 47 +
16 19 24 29 38 41
 3  4  8 13 43 49 +
 2 11 17 19 22 50 ++
14 21 22 28 30 45 +
 4 15 21 34 47 49 +
19 34 38 39 40 48
 4 16 24 33 37 48
 8 16 17 18 39 40 +
 1 24 27 30 31 47
 1  7 11 21 30 43 ++
 1  8 13 18 32 36 +
 5 10 12 16 20 21 +
 7 11 23 24 26 35 ++
 7  8 11 13 42 49 +
 1  8 17 34 40 50 ++
 1 24 29 35 41 45
15 17 24 32 44 52 ++
 4 12 21 26 33 38 ++
 2 13 15 41 48 50 +
 2  7  9 27 45 52 ++
24 25 35 36 39 42 +
 8 22 39 40 42 48
16 18 29 30 34 43
 7 21 28 36 45 50 
 4  8 30 35 39 42
 2 11 15 23 40 51
 2  7 14 18 23 34 +
 1 11 22 37 41 50 +
 4 34 40 44 50 52 ++
12 28 33 39 40 52 +
14 18 25 36 38 39 +
 4 11 16 17 27 37 +
 1 11 16 28 31 36 +
 8 16 31 34 36 52 ++
 7 10 15 21 35 36 +++
 2  9 21 23 29 30 +
15 29 33 41 46 47
 2  5 18 34 36 39 +
 7 15 21 31 45 50 +++
12 17 20 28 39 51 +
 3  7 22 26 50 52 +
 1  5 21 27 31 39 +
 2  8 10 23 34 50 +
 1 11 24 26 32 52 ++
 1 18 20 38 41 42
12 33 36 42 45 48 +
 1  6 21 28 37 39 +
16 18 19 22 33 35
 2  7 17 27 29 47 ++
15 19 20 25 42 45
 2  6 17 19 20 41 +
 1 13 34 42 43 46
16 29 30 31 34 47
 5  7 26 29 36 46 +++
 1 27 28 30 31 49
 8 17 19 47 49 52 ++
 5 23 32 41 42 45
11 13 22 29 40 46
16 17 18 20 41 43 +
 3 17 26 38 45 52 
13 18 21 38 39 41 +
14 19 28 40 44 51
 4  8  9 36 43 47 +
 1  9 15 24 36 39 +
 4 31 37 41 42 43
 7 12 18 27 36 42 ++
 3  4 26 27 35 51 ++
 7 12 19 23 26 45 ++
19 28 36 39 42 52 ++
 8 17 21 44 46 51 ++
 2  4 18 19 36 49 +
 1  4 11 16 22 35
13 14 17 18 41 46 +
 8 16 23 29 43 48
 1  8 25 36 37 44 +
 7 20 21 23 36 50 
 3  7 23 27 39 43 ++
 4 10 21 37 38 48 +
 6 18 30 35 36 42 +
 3 14 23 43 46 48 +
10 11 19 26 42 46 +
 1  5 27 34 42 45
 1 16 29 33 40 46
32 41 43 45 48 51
 1 13 23 24 46 49
24 25 28 30 32 40
 8 14 20 33 50 52 ++
 2 16 27 28 33 39
13 17 19 32 43 52 ++
10 11 16 43 45 49
 2  4 20 22 35 44
 1 12 18 36 37 40 +
 8 10 16 22 35 47
 8 11 16 31 45 46
11 13 22 25 26 27 +
 3 17 25 26 29 40 +++
 7 10 27 37 46 47 +
 3  5  7 27 33 40 ++
 4 14 28 37 40 44
18 22 25 33 43 48
11 19 26 30 44 50 ++
 3 11 22 42 46 51 +
 7  8 21 26 30 50 
 6 1

Re: Picking a license

2010-05-13 Thread Brendan Abel
While I think most of the disagreement in this long thread results
from different beliefs in what "freedom" means, I wanted to add, that
most of the responses that argue that the MIT license permits the user
more freedom than the GPL, suffer from the broken window fallacy.
This fallacy results from the short-sided-ness of the user base, as it
is only considering the first generation of derivative works.

I agree, that under an MIT license, the first generation of derivative
works have more freedom.  But any extra freedom gained here comes at
the direct expense of all future generations of derivative software.

Under a GPL license, it is true that the first generation will have
less freedom to distribute their software as they would like.  But it
also ensures that all subsequent generations of derivative works have
the freedom to access all previous derivative works.

I also want to add that I think the GPL v3 has exceeded this
fundamental concept.  GPL v2 really embodies this meaning of "freedom".
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Steven D'Aprano
On Thu, 13 May 2010 08:06:52 -0700, Patrick Maupin wrote:

> If I download an Ubuntu
> ISO, burn it and give it away (let's say I give away 100 copies, just to
> remove the fair use defense), then I have violated the GPL.  I provided
> chapter and verse on this; go look it up.

I'm sorry, I can't see where you have provided "chapter and verse", or 
even a URL.


>> If you compiled the CD yourself, and failed to provide a written offer
>> on the CD, then yes absolutely you would be in violation of the licence
>> terms, and shame on you.
> 
> Not relevant.

You didn't specify whether the "Linux CD" you were distributing was a 
mere copy of an existing CD , or one you created yourself, so you will 
pardon me for covering both possibilities.


>> The GPL doesn't require you to force source code on those who don't
>> want it, but it does require you to make it available if they ask, and
>> for you to notify them appropriately of this fact. You don't even have
>> to explicitly tell your friend he can have the source code. You just
>> have to make sure that the written offer is available on the disk you
>> give him.
> 
> There is no written offer on the disk, because I burned it from Ubuntu's
> repository.  It really is that simple -- if I give away copies I've made
> of Ubuntu, I've violated the GPL.

No, I think this use-case would count as "propagation without conveying", 
since you are merely acting as a mechanical proxy between your friend(s) 
and Ubuntu.

I will admit that the GPL FAQs are not as clear about this matter as they 
should be.



> Unless you can cite some authority
> that tells me I'm wrong and gives real reasons.  I actually quoted
> chapter and verse from the license, but you chose to ignore that and
> make unsubstantiated claims.

I'm sorry, I can't find where you have quoted "chapter and verse" from 
the licence, so I can't comment.



[snip]
>> but imagine if everyone did it, if Red Hat and Debian and Ubuntu etc
>> didn't bother passing on the source code (or a written offer).
> 
> Then somebody else would.  How does Apache work?

Apache is niche software, and sadly its popularity is falling 
significantly. (~200 million webservers is a large niche, but it's still 
a niche.) The scales on the Netcraft graph are useless, so I can't read 
accurate numbers, but it looks like it has fallen from approximately a 
75% market share to under 55%.

http://news.netcraft.com/archives/web_server_survey.html

Perhaps the Apache model doesn't work quite as well as you think?

As far as not-so-niche software goes, the GPLed Linux OS is far more 
popular on the desktop than FreeBSD and OpenBSD together, and about equal 
in popularity to Mac OS. I'm not suggesting that the popularity of an OS 
is *entirely* dependent on the licence, but it may be a factor.



>> Only a
>> tiny proportion of people would discover by their own efforts that the
>> source code was available
> 
> No, I tell my friends that source is available, and they can come and
> see me if they want to know more.

That doesn't scale to distributing hundreds of copies of the CD, let 
alone tens of thousands. If you're handing over a single copy to a friend 
(which is the example you gave earlier) then a verbal offer works well, 
and is only a technical breach of the GPL. If you're distributing 
hundreds of copies, I don't believe any such verbal offer is practical.


> This may have been a viable argument
> in 1989 (doubtful) but it's extremely silly today.

So you say.


>>, and only a proportion of them would learn
>> where it was available from. The result in practical terms would be a
>> major decrease in the number of people granted the freedom to modify
>> the source code, and a correspondingly larger decrease in the number of
>> people both free and able to modify the source code.
> 
> I sincerely doubt your dystopian vision, which, like the GPL and many
> laws, is predicated on some outmoded views about how humans interact.
> 
> The reason some people say that the GPL protects the "freedom of the
> code" is because the GPL assumes that code needs to be nurtured, instead
> of taking the viewpoint that, while there may be some freeloaders,
> sharing code is obviously so valuable to most of humanity that it will
> just happen.  We don't live in medieval Europe any more where the rules
> of glassmaking are so secret that you'll be hunted down like a dog if
> you try to leave.  We live in a world where "co- opetition" has been
> shown to be so valuable we had to make up a word for it, and even for
> those secrets that people are willing to kill to keep, we have
> wikileaks.

I admire your optimism, but don't share it.


> Let's face it -- a software freeloader is not the most evil thing in the
> world.  

*A* software freeloader certainly isn't a big problem. Cutting down *a* 
tree is no big deal either, but consider what happened to the people of 
Easter Island, Ethiopia and Haiti when *everyone* did so. The terms of 
the GPL exist to di

Re: Picking a license

2010-05-13 Thread Steven D'Aprano
On Thu, 13 May 2010 06:24:04 -0700, Ed Keith wrote:

> --- On Thu, 5/13/10, Lawrence D'Oliveiro
>  wrote:
>>
>> What have you got against LGPL for this purpose? --
>> 
> Most of my clients would not know how to relink a program if their life
> depended on it. And I do not want to put then in DLL hell. So I avoid
> the LGPL.


Are you implying that by distributing your libraries under the MIT or 
Apache licence, no linking is required? That's a cool trick, can you 
explain how it works please?



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


ANN: Wing IDE 3.2.7 released

2010-05-13 Thread Wingware

Hi,

Wingware has released version 3.2.7 of Wing IDE, an integrated development
environment designed specifically for the Python programming language.

Wing IDE is a cross-platform Python IDE that provides a professional code
editor with vi, emacs, and other key bindings, auto-completion, call tips,
a powerful graphical debugger, version control, unit testing, search, and
many other features.

This release includes the following minor features and improvements:

* Added preference to control mini-search case sensitivity
* Added Debug to Here editor context menu item and Alt-F5 binding
* Fixed parsing of "from package.module import *" statements
* Fixed shared perspectives
* Improved default extension set in Windows file dialogs
* Several VI mode improvements (details in change log)
* Several Templates tool fixes (details in change log)
* Confirm close of Feedback and Bug Report windows
* Fix up and down arrow keys in Debug I/O tool
* Several other minor bug fixes

See the change log at http://wingware.com/pub/wingide/3.2.7/CHANGELOG.txt
for details

*Downloads*

Wing IDE Professional and Wing IDE Personal are commercial software and
require a license to run.  A free trial license can be obtained directly 
from

the product when launched.  Wing IDE 101 can be used free of charge.

Wing IDE Pro 3.2.7http://wingware.com/downloads/wingide/3.2

Wing IDE Personal 3.2.7   http://wingware.com/downloads/wingide-personal/3.2

Wing IDE 101 3.2.7http://wingware.com/downloads/wingide-101/3.2

*About Wing IDE*

Wing IDE is an integrated development environment designed specifically for
the Python programming language. It provides powerful editing, testing, and
debugging features that help reduce development and debugging time, cut down
on coding errors, and make it easier to understand and navigate Python code.
Wing IDE can be used to develop Python code for web, GUI, and embedded
scripting applications.

Wing IDE is available in three product levels:  Wing IDE Professional is
the full-featured Python IDE, Wing IDE Personal offers a reduced feature
set at a low price, and Wing IDE 101 is a free simplified version designed
for teaching entry level programming courses with Python.

Version 3.2 of Wing IDE Professional includes the following major features:

* Professional quality code editor with vi, emacs, and other keyboard 
personalities
* Code intelligence for Python:  Auto-completion, call tips, 
goto-definition,

 error indicators, smart indent and rewrapping, and source navigation
* Advanced multi-threaded debugger with graphical UI, command line 
interaction,

 conditional breakpoints, data value tooltips over code, watch tool, and
 externally launched and remote debugging
* Powerful search and replace options including keyboard driven and 
graphical

 UIs, multi-file, wild card, and regular expression search and replace
* Version control integration for Subversion, CVS, Bazaar, git, 
Mercurial, and

 Perforce
* Integrated unit testing with unittest, nose, and doctest frameworks
* Many other features including project manager, bookmarks, code snippets,
 OS command integration, indentation manager, PyLint integration, and 
perspectives

* Extremely configurable and may be extended with Python scripts

Please refer to the feature list at http://wingware.com/wingide/features for
a detailed listing of features by product level.

System requirements are Windows 2000 or later, OS X 10.3.9 or later for 
PPC or

Intel (requires X11 Server), or a recent Linux system (either 32 or 64 bit).
Wing IDE supports Python versions 2.0.x through 3.1.x and Stackless Python.

For more information, see http://wingware.com/products

*Purchasing and Upgrading*

Wing 3.2 is a free upgrade for all Wing IDE 3.0 and 3.1 users. Version 2.x
licenses cost 1/2 the normal price to upgrade.

Upgrade a 2.x license: https://wingware.com/store/upgrade

Purchase a 3.x license:https://wingware.com/store/purchase

--

The Wingware Team
Wingware | Python IDE
Advancing Software Development

www.wingware.com

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


Re: indexing lists/arrays question

2010-05-13 Thread Tim Chase

On 05/13/2010 12:51 PM, a wrote:

If your two arrays are of the same length, you can do things like

a = [2,3,3,4,5,6]
b = ['a', 'b', 'c', 'd', 'e', 'f']

print [m for (n,m) in zip(a,b) if n == 3]

and skip the indexes altogether.


mmm, that's clever, thanks.  although i don't know why it works yet.
at least i found a good user group!


the zip() function takes its parameters and returns a list 
containing paired items from each list:


>>> print zip(a,b) # using the above-defined a/b
[(2, 'a'), (3, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')]

The list comprehension then iterates over the elements of that 
list, assigned as (n,m), testing "n" (the numeric value you want 
to test) and returning "m" (the corresponding value in "b")


-tkc



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


Re: Picking a license

2010-05-13 Thread Carl Banks
On May 13, 4:30 pm, Brendan Abel <[email protected]> wrote:
> While I think most of the disagreement in this long thread results
> from different beliefs in what "freedom" means, I wanted to add, that
> most of the responses that argue that the MIT license permits the user
> more freedom than the GPL, suffer from the broken window fallacy.
> This fallacy results from the short-sided-ness of the user base, as it
> is only considering the first generation of derivative works.
>
> I agree, that under an MIT license, the first generation of derivative
> works have more freedom.  But any extra freedom gained here comes at
> the direct expense of all future generations of derivative software.
>
> Under a GPL license, it is true that the first generation will have
> less freedom to distribute their software as they would like.  But it
> also ensures that all subsequent generations of derivative works have
> the freedom to access all previous derivative works.

I believe the you have the fallacy backwards.

The thing you GPL fanbois refuse to understand or accept is that, in
the real world, a person or company who doesn't want to open source
their "derivative work" will only rarely be forced to by the GPL.
They'll work around it instead, vast majority of the time.  They
could:

1. Derive their work from a project with a license that grants the
user more freedom
2. Reimplment the functionality seperately (*cough* PySide)
3. Ignore the license

And no, a small number of anecdotal counterexamples is not any strong
evidence to the contrary.

On the other hand, those who intended to release their work as open
source are going to do it even if the license is permissive.  The way
some of you GPL fanbois talk you'd think the MIT license prohibitied
open source derivatives.

So, you see, the rights given to users of first generation works (as
you say) are far more important than requiring people who create
"derivatives" to also offer those rights.  Those who intend to do that
will anyways, those who don't intend to will find a way not to.


Carl Banks

PS The word "derivative" is quoted throught because the GPL's
definition of "derivative" is ludicrous and not in accordance any
common defintion of the word.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: walk directory & ignore all files/directories begin with '.'

2010-05-13 Thread Tim Chase

On 05/13/2010 12:58 PM, albert kao wrote:

I want to walk a directory and ignore all the files or directories
which names begin in '.' (e.g. '.svn').
Then I will process all the files.
My test program walknodot.py does not do the job yet.
Python version is 3.1 on windows XP.
Please help.

[code]
#!c:/Python31/python.exe -u
import os
import re

path = "C:\\test\\com.comp.hw.prod.proj.war\\bin"
for dirpath, dirs, files in os.walk(path):
 print ("dirpath " + dirpath)
 p = re.compile('\\\.(\w)+$')
 if p.match(dirpath):
 continue
 print ("dirpath " + dirpath)
 for dir in dirs:
 print ("dir " + dir)
 if dir.startswith('.'):
 continue

 print (files)
 for filename in files:
 print ("filename " + filename)
 if filename.startswith('.'):
 continue
 print ("dirpath filename " + dirpath + "\\" + filename)
# process the files here
[/code]

C:\python>walknodot.py
dirpath C:\test\com.comp.hw.prod.proj.war\bin
dirpath C:\test\com.comp.hw.prod.proj.war\bin
dir .svn
dir com
[]
dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
dirpath C:\test\com.comp.hw.prod.proj.war\bin\.svn
...

I do not expect C:\test\com.comp.hw.prod.proj.war\bin\.svn to appear
twice.


Note that the first time .svn appears, it's as "dir .svn" while 
the second time it appears, it's via "dirpath ...\.svn"


If you don't modify the list of dirs in place, os.walk will 
descend into all the dirs by default.  (Also, you shouldn't mask 
the built-in dir() function by naming your variables "dir")


While it can be detected with regexps, I like the clarity of just 
using ".startswith()" on the strings, producing something like:


  for curdir, dirs, files in os.walk(root):
# modify "dirs" in place to prevent
# future code in os.walk from seeing those
# that start with "."
dirs[:] = [d for d in dirs if not d.startswith('.')]

print curdir
for f in files:
  if f.startswith('.'): continue
  print (os.path.join(curdir, f))

-tkc



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


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Carl Banks  wrote:

> 
> The thing you GPL fanbois refuse to understand or accept is
> that, in
> the real world, a person or company who doesn't want to
> open source
> their "derivative work" will only rarely be forced to by
> the GPL.
> They'll work around it instead, vast majority of the
> time.  They
> could:
> 
> 1. Derive their work from a project with a license that
> grants the
> user more freedom
> 2. Reimplment the functionality seperately (*cough*
> PySide)
> 3. Ignore the license

I think you have over looked the most common, keep the software in house and 
not let anyone else use it. This way you are in full compliance with the GPL. 
If you let someone else use the software that you need to talk to a lawyer, or 
GPL your software.

> 
> And no, a small number of anecdotal counterexamples is not
> any strong
> evidence to the contrary.
> 
> On the other hand, those who intended to release their work
> as open
> source are going to do it even if the license is
> permissive.  The way
> some of you GPL fanbois talk you'd think the MIT license
> prohibitied
> open source derivatives.

If I use MIT licensed code, I can give someone else access to the program with 
out binding them to the legal restrictions of the GPL. 

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


 


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


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Brendan Abel <[email protected]> wrote:

> From: Brendan Abel <[email protected]>
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 7:30 PM
> While I think most of the
> disagreement in this long thread results
> from different beliefs in what "freedom" means, I wanted to
> add, that
> most of the responses that argue that the MIT license
> permits the user
> more freedom than the GPL, suffer from the broken window
> fallacy.
> This fallacy results from the short-sided-ness of the user
> base, as it
> is only considering the first generation of derivative
> works.
> 
> I agree, that under an MIT license, the first generation of
> derivative
> works have more freedom.  But any extra freedom gained
> here comes at
> the direct expense of all future generations of derivative
> software.
> 
> Under a GPL license, it is true that the first generation
> will have
> less freedom to distribute their software as they would
> like.  But it
> also ensures that all subsequent generations of derivative
> works have
> the freedom to access all previous derivative works.
> 
> I also want to add that I think the GPL v3 has exceeded
> this
> fundamental concept.  GPL v2 really embodies this
> meaning of "freedom".
> -- 
> http://mail.python.org/mailman/listinfo/python-list

I ALWAYS give my client my source code. But I do not want to bind them to the 
requirements of the GPL, I want them to be free do do what they want with the 
program, so I never incorporate any GPLed code in my projects.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





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


Re: Picking a license

2010-05-13 Thread Aahz
In article <2d625c61-7a94-4c71-8953-69c3b3c76...@k29g2000yqh.googlegroups.com>,
Paul Boddie   wrote:
>
>All my position has ever been is this:
>
>A copyrighted work denies recipients virtually all rights to do stuff
>with that work, such as modify and redistribute it. Copyleft licences
>grant some privileges and uphold some obligations in order to ensure
>that these privileges are universally maintained in all forms and
>extensions of the work. Permissive licences grant more privileges to
>immediate recipients but do not uphold as many obligations.
>
>You rejected the suggestion that people using permissive licences
>afford users fewer privileges than those using copyleft licences, yet
>on balance when considering all forms and extensions of the work, they
>do. And the only such privilege that the copyleft licences withholds
>from recipients is that of withholding any other privilege from others
>who receive the work.

IMO this only makes sense if one agrees that people should not be allowed
to sell software for money.  Absent that agreement, your argument about
freedom seems rather limited.
-- 
Aahz ([email protected])   <*> http://www.pythoncraft.com/

f u cn rd ths, u cn gt a gd jb n nx prgrmmng.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 6:30 pm, Brendan Abel <[email protected]> wrote:
> While I think most of the disagreement in this long thread results
> from different beliefs in what "freedom" means, I wanted to add, that
> most of the responses that argue that the MIT license permits the user
> more freedom than the GPL, suffer from the broken window fallacy.
> This fallacy results from the short-sided-ness of the user base, as it
> is only considering the first generation of derivative works.

The broken window fallacy is about labor that could have been spent
elsewhere if someone else had done something differently.  The only
time that comes into play in my programming life is when I have to
recode something that is nominally available under the GPL, so I'm not
sure this is really making the point you think it is.

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


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 6:39 pm, Steven D'Aprano
 wrote:
> On Thu, 13 May 2010 08:06:52 -0700, Patrick Maupin wrote:
> > If I download an Ubuntu
> > ISO, burn it and give it away (let's say I give away 100 copies, just to
> > remove the fair use defense), then I have violated the GPL.  I provided
> > chapter and verse on this; go look it up.
>
> I'm sorry, I can't see where you have provided "chapter and verse", or
> even a URL.

In the original message, I wrote "In the case of GPL v3, for example,
Ubuntu lets me download code under 6d, so if I download it and burn
it, I would have to use 6a or 6b; if I had actually received a CD from
Ubuntu, I might be able to use 6c, but not if I downloaded it."  I
thought it was clear those were references to the license clauses.

> >> If you compiled the CD yourself, and failed to provide a written offer
> >> on the CD, then yes absolutely you would be in violation of the licence
> >> terms, and shame on you.
>
> > Not relevant.
>
> You didn't specify whether the "Linux CD" you were distributing was a
> mere copy of an existing CD , or one you created yourself, so you will
> pardon me for covering both possibilities.

Well, in the section I just quoted, I did mention "Ubuntu"...

> >> The GPL doesn't require you to force source code on those who don't
> >> want it, but it does require you to make it available if they ask, and
> >> for you to notify them appropriately of this fact. You don't even have
> >> to explicitly tell your friend he can have the source code. You just
> >> have to make sure that the written offer is available on the disk you
> >> give him.
>
> > There is no written offer on the disk, because I burned it from Ubuntu's
> > repository.  It really is that simple -- if I give away copies I've made
> > of Ubuntu, I've violated the GPL.
>
> No, I think this use-case would count as "propagation without conveying",
> since you are merely acting as a mechanical proxy between your friend(s)
> and Ubuntu.

No, I'm actually creating a copy and distributing it (in GPL v3
terminology, conveying it), especially since my friends don't
specifically ask for Ubuntu, and I'm foisting it off on them
(especially if I burn 10 CDs at a time so I have one if I need it).
GPL v2 also has similar rules, and there's lots of v2 licensed
software on the Ubuntu CD.

> I will admit that the GPL FAQs are not as clear about this matter as they
> should be.

I think it's quite clear, although a bit of a tedious slog.  But since
you want a URL, try this:  
http://www.gnu.org/licenses/gpl-faq.html#UnchangedJustBinary

> > Unless you can cite some authority
> > that tells me I'm wrong and gives real reasons.  I actually quoted
> > chapter and verse from the license, but you chose to ignore that and
> > make unsubstantiated claims.
>
> I'm sorry, I can't find where you have quoted "chapter and verse" from
> the licence, so I can't comment.

Well, I just re-copied what I posted, and added a URL from the FAQ.

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


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 6:39 pm, Steven D'Aprano
 wrote:
> On Thu, 13 May 2010 08:06:52 -0700, Patrick Maupin wrote:

[...]

> >> Only a
> >> tiny proportion of people would discover by their own efforts that the
> >> source code was available
>
> > No, I tell my friends that source is available, and they can come and
> > see me if they want to know more.
>
> That doesn't scale to distributing hundreds of copies of the CD, let
> alone tens of thousands.

Sure it does.  Each one of those CD distributions is friend-to-
friend.  And if my friend gives a CD to someone interested in
programming, I might wind up with a new friend.

> If you're handing over a single copy to a friend
> (which is the example you gave earlier) then a verbal offer works well,
> and is only a technical breach of the GPL. If you're distributing
> hundreds of copies, I don't believe any such verbal offer is practical.

Right.  And lots of Linux Users Groups are in breach of the GPL on
many software packages.  But guess what?  It really doesn't matter,
because the source is sitting there on the internet, for the taking.

> > This may have been a viable argument
> > in 1989 (doubtful) but it's extremely silly today.
>
> So you say.

Yes, that what's I believe.  More anon.

>
> >>, and only a proportion of them would learn
> >> where it was available from. The result in practical terms would be a
> >> major decrease in the number of people granted the freedom to modify
> >> the source code, and a correspondingly larger decrease in the number of
> >> people both free and able to modify the source code.
>
> > I sincerely doubt your dystopian vision, which, like the GPL and many
> > laws, is predicated on some outmoded views about how humans interact.
>
> > The reason some people say that the GPL protects the "freedom of the
> > code" is because the GPL assumes that code needs to be nurtured, instead
> > of taking the viewpoint that, while there may be some freeloaders,
> > sharing code is obviously so valuable to most of humanity that it will
> > just happen.  We don't live in medieval Europe any more where the rules
> > of glassmaking are so secret that you'll be hunted down like a dog if
> > you try to leave.  We live in a world where "co- opetition" has been
> > shown to be so valuable we had to make up a word for it, and even for
> > those secrets that people are willing to kill to keep, we have
> > wikileaks.
>
> I admire your optimism, but don't share it.

I understand that.  There are a lot of people out there who will
attempt to profit off of other peoples' labor without any value-add.
But it's getting more difficult to do that.  A key element in any kind
of arbitrage is imperfect communications, and the internet is rapidly
perfecting almost all communications.

> > Let's face it -- a software freeloader is not the most evil thing in the
> > world.
>
> *A* software freeloader certainly isn't a big problem. Cutting down *a*
> tree is no big deal either, but consider what happened to the people of
> Easter Island, Ethiopia and Haiti when *everyone* did so.

In a different context, you would probably be arguing about how
software is not like physical goods, and nobody is made poorer if I
make my own copy of it.

> The terms of
> the GPL exist to discourage freeloaders, lest everyone does so. The
> obligations it imposes are not onerous by any stretch of the exaggeration.

Well, you still don't believe that if I download a CD and give it to a
friend I legally have to download a DVD's worth of source to go with
it :-)  (Mind you, I don't believe for a minute anybody would be
stupid enough to try to sue over that, or that copying a few CDs
wouldn't be covered by fair use, but I *do* believe that the license
attempts to require the source to be distributed.)

> >> It's not enough to be granted freedom to modify source code in theory,
> >> if you know about it, if you can find some hard-to-locate website which
> >> may or may not be running. The practicalities are equally important.
>
> > That's another thing.  Even if I downloaded all the source from Ubuntu,
> > what assurances do I really have that I have all the source? I could be
> > in technical violation of the GPL without even knowing it, even after
> > wasting an extra two days grabbing the source.  Best to use Gentoo to be
> > sure, and even then, I need to build it twice running strace just to
> > make sure that I really built everything.
>
> That's a silly objection to the GPL. When you include an MIT-licenced
> library in your project, you can't be sure that the library wasn't stolen
> from Microsoft and you've therefore accidentally infringed Microsoft's
> copyright. This isn't an argument against the MIT licence any more than
> your hypothetical is an argument against the GPL.

Well, OK, it's a bit silly, but not really the same as your example,
and certainly much more likely.  I have never downloaded any FOSS that
had any licensing issues I know of (and trust me, SCO tried really
hard on t

Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 6:39 pm, Steven D'Aprano
 wrote:
> On Thu, 13 May 2010 08:06:52 -0700, Patrick Maupin wrote:

> Perhaps the Apache model doesn't work quite as well as you think?

Apparently it's 66 percent of the web servers for the million busiest
sites,  and presumably 65 for the next million, etc...

When I look at the netcraft graphs, the only thing that seemed to
cause a decline before last year was Microsoft and their marketing
muscle.  For example, they incentivize godaddy and others to run all
the parked sites on IIS.

In the graphs, there was a sudden spike in "other" at the beginning of
last year. My gut tells me this is ROR, django, and other similarly
permissively licensed software.  In any case, back when GPL take-up
was quite small, RMS was very dismissive of market numbers, but I
really have to ask:  where are all the GPL-licensed web servers?

> As far as not-so-niche software goes, the GPLed Linux OS is far more
> popular on the desktop than FreeBSD and OpenBSD together, and about equal
> in popularity to Mac OS. I'm not suggesting that the popularity of an OS
> is *entirely* dependent on the licence, but it may be a factor.

Well, despite what others have said here, I think the lingering
effects of the Unix lawsuit helped give Linux a push.  Torvalds
himself was a huge factor, and I'm willing to concede that the GPL
didn't hinder the quest for contributors.

The fact is that, in reality (Darwinian competition to determine the
best architecture aside) it's very nice to have a single primary point
of focus for an OS, and Unix was perceived to be hopelessly fragmented
by many would-be contributors who wouldn't know where to start.

I also firmly believe, as I have stated before, that the GPL is a much
more commercial license.  If you want to make money off something,
then, no doubt, GPL keeps your competitors from being able to take
what you wrote and redistribute it as closed source.  But, frankly I
view that as more of a business issue than a moral issue.

In any case, if you want to look, as a marketer would, at TAM (Total
Available Market), free software is completely floundering in the OS
space, and permissively licensed software owns the serious web server
space.

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


Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message <72888d2c-4b1a-4b08-a3aa-
[email protected]>, Patrick Maupin wrote:

> If I download an Ubuntu ISO, burn it and give it away (let's say I give
> away 100 copies, just to remove the fair use defense), then I have
> violated the GPL.  I provided chapter and verse on this; go look it up.

I have looked it up , and sections 
3b or 3c would seem to apply. Or alternatively 
, 6b or 6c. If the source you got it 
from didn’t violate the GPL, then obviously you didn’t either.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith 
wrote:

> The claim is being made that [the GPL] restricts freedom.

What about the “freedom” to restrict other people’s freedom? Should that be 
restricted or not?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith 
wrote:

> Assertion I:
>If person A is free to do more than person B, then person A has
>more freedom then person B.
> 
> Assertion II:
>If person A is free do perform an action person B is not free to
>perform then person A is free to do more than person B.
> 
> Assertion III:
>   If person B is restricted in some way that person A is not them Person A
>   is free to do something Person B is not free to do.
> 
> Conclusion:
>   If person B is more resticted than Peston A, Person A has mor freedom
>   than person B.
> 
> Which step in this reasoning do you disagree with?

Under the GPL, everybody has exactly the same freedoms. So which of your 
assertions is supposedly a criticism of the GPL?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith 
wrote:

> On Thu, 5/13/10, Lawrence D'Oliveiro
>  wrote:
> 
>> In message ,
>> Ed Keith wrote:
>> 
>>> So if you want me to even consider using your library
>>> do not use GPL, or LGPL.
>> 
>> What have you got against LGPL for this purpose?
> 
> Most of my clients would not know how to relink a program if their life
> depended on it. And I do not want to put then in DLL hell. So I avoid the
> LGPL.

How exactly does the LGPL lead to a requirement to “relink”?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 10:07 pm, Lawrence D'Oliveiro  wrote:

> How exactly does the LGPL lead to a requirement to “relink”?

I think this might be a misconception, but I'm not 100% sure.  Since
Ed gives his customers full source code, there may not be the
requirement to directly provide the ability to relink, because "The
“Corresponding Application Code” for a Combined Work means the object
code and/or source code for the Application." and section 4d0 requires
you to "permit the user to recombine or relink" where "recombine"
isn't defined directly (perhaps in the underlying GPL?)

Nonetheless, all the dotting of i's and crossing of t's to satisfy
section 4 and the underlying GPL probably require a lawyer to check
your source code distribution.  For example, what is "prominent
notice"?

And I love the gem at 4e:  "Provide Installation Information, but only
if you would otherwise be required to provide such information under
section 6 of the GNU GPL, and only to the extent that such information
is necessary to install and execute a modified version of the Combined
Work produced by recombining or relinking the Application with a
modified version of the Linked Version. (If you use option 4d0, the
Installation Information must accompany the Minimal Corresponding
Source and Corresponding Application Code. If you use option 4d1, you
must provide the Installation Information in the manner specified by
section 6 of the GNU GPL for conveying Corresponding Source.)"

I mean, it's in English and very technically precise, but if you
follow all the references, you quickly come to realize that the
license is a "patch" to the GPL.  It was deliberately made in patch
format to make it smaller, but as we all know, reading source code and
the accompanying patch is almost always more difficult than reading
the patched source.

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


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 10:03 pm, Lawrence D'Oliveiro  wrote:
> In message <72888d2c-4b1a-4b08-a3aa-
>
> [email protected]>, Patrick Maupin wrote:
> > If I download an Ubuntu ISO, burn it and give it away (let's say I give
> > away 100 copies, just to remove the fair use defense), then I have
> > violated the GPL.  I provided chapter and verse on this; go look it up.
>
> I have looked it up , and sections
> 3b or 3c would seem to apply. Or alternatively
> , 6b or 6c. If the source you got it
> from didn’t violate the GPL, then obviously you didn’t either.

I don't think that's necessarily true.  As I've posted before:  "In
the
case of GPL v3, for example, Ubuntu lets me download code under 6d, so
if I download it and burn it, I would have to use 6a or 6b; if I had
actually received a CD from Ubuntu, I might be able to use 6c, but not
if I downloaded it."

That's because to use 6c, the initial underlying distribution had to
be done with 6b, not 6d.  Also the FAQ is very clear:
http://www.gnu.org/licenses/gpl-faq.html#UnchangedJustBinary

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


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 10:04 pm, Lawrence D'Oliveiro  wrote:
> In message , Ed Keith
> wrote:
>
> > The claim is being made that [the GPL] restricts freedom.
>
> What about the “freedom” to restrict other people’s freedom? Should that be
> restricted or not?

It's interesting that some people don't like the comparison of the
Free Software movement to a religion, yet the main argument of the
movement, and the deliberate co-opting of words like "Free" and "Free
Software" are done in an attempt to guilt others into accepting RMS's
vision of morality.

He's perfectly welcome have that vision.  But I don't let it affect my
own moral compass -- I reject it as just another post-modern religion,
AKA cult.

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


Re: Picking a license

2010-05-13 Thread Patrick Maupin
On May 13, 10:06 pm, Lawrence D'Oliveiro  wrote:
> In message , Ed Keith
> wrote:
>
>
>
> > Assertion I:
> >    If person A is free to do more than person B, then person A has
> >    more freedom then person B.
>
> > Assertion II:
> >    If person A is free do perform an action person B is not free to
> >    perform then person A is free to do more than person B.
>
> > Assertion III:
> >   If person B is restricted in some way that person A is not them Person A
> >   is free to do something Person B is not free to do.
>
> > Conclusion:
> >   If person B is more resticted than Peston A, Person A has mor freedom
> >   than person B.
>
> > Which step in this reasoning do you disagree with?
>
> Under the GPL, everybody has exactly the same freedoms. So which of your
> assertions is supposedly a criticism of the GPL?

That's absolutely not true.  For a start, the original author can dual-
license.  This is not a theoretical issue -- it is a multi-million
dollar issue.

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


Re: client to upload big files via https and get progress info

2010-05-13 Thread Sean DiZazzo
On May 13, 9:39 am, News123  wrote:
> Hi Aaaz,
>
> Aahz wrote:
> > In article <[email protected]>,
> > News123   wrote:
> >> I'd like to perform huge file uploads via https.
> >> I'd like to make sure,
> >> - that I can obtain upload progress info (sometimes the nw is very slow)
> >> - that (if the file exceeds a certain size) I don't have to
> >>  read the entire file into RAM.
>
> > Based on my experience with this, you really need to send multiple
> > requests (i.e. "chunking").  There are ways around this (you can look
> > into curl's resumable uploads), but you will need to maintain state no
> > matter what, and I think that chunking is the best/simplest.
>
> I agree I need  chunking. (the question is just on which level of the
> protocol)
>
> I just don't know how to make a chunkwise file upload or what library is
> best.
>
> Can you recommend any libraries or do you have a link to an example?
>
> I'd like to avoid to make separate https post requests for the chunks
> (at least if the underlying module does NOT support keep-alive connections)
>
> I made some tests with high level chunking (separate sequential https
> post requests).
> What I noticed is a rather high penalty in data throughput.
> The reason is probably, that each request makes its own https connection
> and that either the NW driver or the TCP/IP stack doesn't allocate
> enough band width to my request.
>
> Therefore I'd like to do the chunking on a 'lower' level.
> One option would be to have a https module, which supports keep-alive,
>
> the other would be  to have a library, which creates a http post body
> chunk by chunk.
>
> What do others do for huge file uploads
> The uploader might be connected via ethernet, WLAN, UMTS, EDGE, GPRS. )
>
> N

You could also just send the file in one big chunk and give yourself
another avenue to read the size of the file on the server.  Maybe a
webservice that you call with the name of the file that returns it's
percent complete, or it could just return bytes on disk and you do the
math on the client side.  Then you just forget about the transfer and
query the file size whenever you want to know...or on a schedule.

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


Re: client to upload big files via https and get progress info

2010-05-13 Thread Sean DiZazzo
On May 13, 9:54 pm, Sean DiZazzo  wrote:
> On May 13, 9:39 am, News123  wrote:
>
>
>
> > Hi Aaaz,
>
> > Aahz wrote:
> > > In article <[email protected]>,
> > > News123   wrote:
> > >> I'd like to perform huge file uploads via https.
> > >> I'd like to make sure,
> > >> - that I can obtain upload progress info (sometimes the nw is very slow)
> > >> - that (if the file exceeds a certain size) I don't have to
> > >>  read the entire file into RAM.
>
> > > Based on my experience with this, you really need to send multiple
> > > requests (i.e. "chunking").  There are ways around this (you can look
> > > into curl's resumable uploads), but you will need to maintain state no
> > > matter what, and I think that chunking is the best/simplest.
>
> > I agree I need  chunking. (the question is just on which level of the
> > protocol)
>
> > I just don't know how to make a chunkwise file upload or what library is
> > best.
>
> > Can you recommend any libraries or do you have a link to an example?
>
> > I'd like to avoid to make separate https post requests for the chunks
> > (at least if the underlying module does NOT support keep-alive connections)
>
> > I made some tests with high level chunking (separate sequential https
> > post requests).
> > What I noticed is a rather high penalty in data throughput.
> > The reason is probably, that each request makes its own https connection
> > and that either the NW driver or the TCP/IP stack doesn't allocate
> > enough band width to my request.
>
> > Therefore I'd like to do the chunking on a 'lower' level.
> > One option would be to have a https module, which supports keep-alive,
>
> > the other would be  to have a library, which creates a http post body
> > chunk by chunk.
>
> > What do others do for huge file uploads
> > The uploader might be connected via ethernet, WLAN, UMTS, EDGE, GPRS. )
>
> > N
>
> You could also just send the file in one big chunk and give yourself
> another avenue to read the size of the file on the server.  Maybe a
> webservice that you call with the name of the file that returns it's
> percent complete, or it could just return bytes on disk and you do the
> math on the client side.  Then you just forget about the transfer and
> query the file size whenever you want to know...or on a schedule.
>
> ~Sean

oops...that doesn't help with the other requirements.  My suggestion
is to not use https.  I don't think it was created to move around
large pieces of data.  Lots of small pieces rather.  SFTP?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: client to upload big files via https and get progress info

2010-05-13 Thread J.O. Aho
News123   wrote:

> What do others do for huge file uploads
> The uploader might be connected via ethernet, WLAN, UMTS, EDGE, GPRS. )

Those cases where I have had to move big files it's been scp on those cases
where you just have to push a new file, in cases where it's a question of
keeping two directories synced, then it's rsync over ssh.
The later one I have never done in python.


-- 

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


Re: Picking a license

2010-05-13 Thread Steven D'Aprano
On Thu, 13 May 2010 17:18:47 -0700, Carl Banks wrote:

> The thing you GPL fanbois refuse to understand or accept is that, in the
> real world, a person or company who doesn't want to open source their
> "derivative work" will only rarely be forced to by the GPL. They'll work
> around it instead, vast majority of the time.  They could:
> 
> 1. Derive their work from a project with a license that grants the user
> more freedom
> 2. Reimplment the functionality seperately (*cough* PySide) 

Yes. So what? In what possible way is this an argument against the GPL?

If I offer to mow your lawn for $20, and you refuse, I don't have to 
force my services onto you. You can mow your lawn yourself, or find 
somebody who will do it for $10, or find some kind generous soul who will 
do it for free under an MIT licence.

If you don't want the obligations of the GPL, nobody is going to force 
you to distribute or derive from the GPLed software. If you're not 
willing to meet my conditions to use my software, then I don't want you 
using my software. Go write your own, or find somebody else who will do 
it for a fee, or for free. What you see as a disadvantage of the GPL is a 
feature, not a bug.

You seem to be under the impression that the only public good developers 
should care about is maximising the number of people who create 
derivative works from your project. That's obviously not so in the real 
world, where vast numbers of developers release software under closed-
source licences, or don't release it to the public at all, and it's 
certainly not the case for people who use the GPL. The FSF even has a FAQ 
about that exact point.



> 3. Ignore the license

This is a crime under copyright law, and there have been many instances 
of companies who thought they could ignore the GPL learning different.


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


Re: Picking a license

2010-05-13 Thread Steven D'Aprano
On Thu, 13 May 2010 19:10:09 -0700, Patrick Maupin wrote:

> The broken window fallacy is about labor that could have been spent
> elsewhere if someone else had done something differently.  The only time
> that comes into play in my programming life is when I have to recode
> something that is nominally available under the GPL, so I'm not sure
> this is really making the point you think it is.

You've never had to recode something because it was nominally available 
under a proprietary licence that you (or your client) was unwilling to 
use? Lucky you!

The GPL ensures that once software has entered the commons (and therefore 
available for all), it can never be removed from the commons. The MIT 
licence does not. Now, you might argue that in practice once software is 
released under an MIT licence, it is unlikely to ever disappear from the 
commons. Well, perhaps, but if so, that's despite and not because of the 
licence.

In practice, I believe most MIT-licenced code never even makes it into 
the commons in the first place. I'm willing to predict that the majority 
of code you've written for paying customers (as opposed to specifically 
for open source projects) has disappeared into their code base, never to 
be seen by anyone outside of the company. Am I right?


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