Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Johann C. Rocholl
Brilliant! On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > def foo${LATIN SMALL LETTER LAMBDA WITH STROKE}$(x${DOUBLE-STRUCK > CAPITAL C}$): > return None${ZERO WIDTH NO-BREAK SPACE}$ > > This is still easy to read and makes the full power of type-annotated Python > available t

Re: Taint (like in Perl) as a Python module: taint.py

2007-02-06 Thread Johann C. Rocholl
On Feb 6, 3:01 am, Ben Finney <[EMAIL PROTECTED]> wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> writes: > > And tainted() returns False by default? > > Sorry but in general, this won't work :( > > I'm inclined to agree that the default should be to flag an object as > tainted unless known ot

Taint (like in Perl) as a Python module: taint.py

2007-02-05 Thread Johann C. Rocholl
The following is my first attempt at adding a taint feature to Python to prevent os.system() from being called with untrusted input. What do you think of it? # taint.py - Emulate Perl's taint feature in Python # Copyright (C) 2007 Johann C. Rocholl <[EMAIL PROTECTED]> # # Permissio

Re: ANN: wxPython 2.7.1.3

2006-10-27 Thread Johann C. Rocholl
Hi Robin, You may want to use a spell checker for announcements and for the wxpython.org website. For example, the first paragraph of your announcement contains the words "plust" and "pacakges", and the word "pacakge" can also be found on the following pages: www.wxpython.org/download.php www.wxp

Re: Writing PNG with pure Python

2006-06-14 Thread Johann C. Rocholl
Ben Finney schrieb: > Simplify. Please don't attempt to write yet another set of license > terms without expert legal assistance. You've already chosen the Expat > license as being acceptable; use that, and you grant all the rest > without even mentioning it. Sorry for my stubborn ignorance, and t

Re: Writing PNG with pure Python

2006-06-13 Thread Johann C. Rocholl
How about this here construct? #!/usr/bin/env python # png.py - PNG encoder in pure Python # Copyright (C) 2006 Johann C. Rocholl <[EMAIL PROTECTED]> # # This file is licensed alternatively under one of the following: # 1. GNU Lesser General Public License (LGPL), Version 2.1 or newer #

Re: Writing PNG with pure Python

2006-06-12 Thread Johann C. Rocholl
> > I have now decided to license my project (including the pure python PNG > > library) under the Apache License 2.0 which is less restrictive than > > the GPL in terms of sublicensing. > > But it is also incompatible with the GPL: > > http://www.fsf.org/licensing/licenses/index_html#GPLIncompatib

Re: Writing PNG with pure Python

2006-06-12 Thread Johann C. Rocholl
> Just in case anybody has the same problem, here's my first attempt at > implementing a subset of the PNG spec in pure Python. I license it to > you under the terms of the GNU GPL. Update: the code is now licensed under the Apache License 2.0. > http://trac.browsershots.org/browser/trunk/shotfac

Re: Writing PNG with pure Python

2006-06-09 Thread Johann C. Rocholl
The MIT license is enticingly short and simple, thank you for the tip. I have now decided to license my project (including the pure python PNG library) under the Apache License 2.0 which is less restrictive than the GPL in terms of sublicensing. The Apache License looks modern and well-maintained

Re: Writing PNG with pure Python

2006-06-09 Thread Johann C. Rocholl
Alan Isaac schrieb: > It's your code, so you get to license it. > But if you wish to solicit patches, > a more Pythonic license is IMHO more likely > to prove fruitful. What license would you suggest? After some reading at [1] and [2] and [3], I found that the Academic Free License (version 2.1) a

Re: Writing PNG with pure Python

2006-06-09 Thread Johann C. Rocholl
> You should really also include the alpha channel. Without that, PNG is > crippled IMHO. I have now added simple transparency (marking one color as transparent with a tRNS chunk). If anybody wants full alpha channel support, ask kindly or send me a patch. I would like to avoid duplicating all the

Writing PNG with pure Python

2006-06-09 Thread Johann C. Rocholl
Just in case anybody has the same problem, here's my first attempt at implementing a subset of the PNG spec in pure Python. I license it to you under the terms of the GNU GPL. http://trac.browsershots.org/browser/trunk/shotfactory/lib/image/png.py It encodes RGB images with 24 bits per pixel into

XML-RPC server with xmlrpclib and mod_python

2006-06-01 Thread Johann C. Rocholl
Hi all, I'm wondering what would be the best way to write an XML-RPC server using mod_python with Apache 2.0. I want the mod_python environment because the rest of my project is web-based, and Apache gives me multi-threading and everything. My first attempt implements XML-RPC introspection. Pleas

Re: That horrible regexp idiom

2005-02-10 Thread Johann C. Rocholl
Hi, > import re > foo_pattern = re.compile('foo') > > '>>> m = foo_pattern.search(subject) > '>>> if m: > '>>>pass > '>>> else: > '>>>pass I agree that is horrible. This is one of my favorite problems with python syntax. > but it occured to me today, that it is possible to do it in pyth

RE: Python and version control

2005-02-09 Thread Johann C. Rocholl
Robert Brewer wrote: > Peter Hansen wrote: > > Carl wrote: > > > What is the ultimate version control tool for Python if you > > > are working in a Windows environment? > > > > I never liked coupling the two together like that. Instead > > I use tools like TortoiseCVS or (now) TortoiseSVN with

Regular expression match objects - compact syntax?

2005-02-03 Thread Johann C. Rocholl
its own local m, so it didn't update the outer m. I couldn't use 'global m' either because the whole thing, including the outer m, happens to be inside a function, too. How do you people handle this? Thanks for your time, Johann C. Rocholl -- http://mail.python.org/mailman/listinfo/python-list