Re: Microsoft IronPython?

2006-01-04 Thread Kay Schluehr
Luis M. González wrote: > Is it good to have Python running on Java and .NET? > Sure, why not? At least for Jython we already know from the Jython homepage that it is the great hope of the Java platform to survive in future and far beyond. With a comparable fate dotNET and Microsoft survive till

Re: Calling GPL code from a Python application

2006-01-04 Thread Karl A. Krueger
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > As far as I know, US copyright law does not give an exemption for > temporary copies in working memory (although I could be wrong about that). > Here in Australia, our government (for once getting it right!) > *explicitly* gives such an exemption to our

Re: itertools.izip brokeness

2006-01-04 Thread Raymond Hettinger
[EMAIL PROTECTED] wrote: > izip's uses can be partitioned two ways: > 1. All iterables have equal lengths > 2. Iterables have different lengths. > > Case 1 is no problem obviously. > In Case 2 there are two sub-cases: > > 2a. You don't care what values occur in the other iterators > after then en

Re: How to generate (enumerate) 2**N tuples representing all vertices of unit hypercube in N-dimensional hyperspace ?

2006-01-04 Thread bonono
Dr. Colombes wrote: > I'm looking for a good Python way to generate (enumerate) the 2**N > tuples representing all vertices of the unit hypercube in N-dimensional > hyperspace. > > For example, for N=4 the Python code should generate the following 2**N > = 16 tuples: > > (1,1,1,1), (1,1,1,-1), >

Re: Calling GPL code from a Python application

2006-01-04 Thread Heiko Wundram
Terry Hancock wrote: > Given that Google has been using this fact extensively, and > they have not been sued over it, I think it's a fairly > clearly established interpretation, whether it is popular or > not (but of course it's not a legal precedent until somebody > does sue and loses). This is n

Re: Calling GPL code from a Python application

2006-01-04 Thread Heiko Wundram
Heiko Wundram wrote: > This is not what the general interpretation of the GPL seems to be with > TrollTech and several other companies. They specifically state that even > when you develop inhouse software with GPL-libraries (Qt in the former > case), you are required to release the code of the app

Re: How to generate (enumerate) 2**N tuples representing all vertices of unit hypercube in N-dimensional hyperspace ?

2006-01-04 Thread Heiko Wundram
Claudio Grondi wrote: > Heiko Wundram wrote: >> def perm(n): >>return (tuple(((1,-1)[(t>>i)%2] for i in xrange(n))) >>for t in xrange(2L**n)) > > Isn't this kind of coding beeing the result of suffering from the > post-pyContest illness syndrom? I don't think what Paul Rubin poste

Re: itertools.izip brokeness

2006-01-04 Thread Paul Rubin
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > Feel free to submit a feature request to the SF tracker (surprisingly, > this behavior has not been previously reported, nor have there any > related feature requests, nor was the use case contemplated in the PEP > discussions: http://www.python.org

Re: Calling GPL code from a Python application

2006-01-04 Thread Phil Thompson
On Wednesday 04 January 2006 9:18 am, Heiko Wundram wrote: > Terry Hancock wrote: > > Given that Google has been using this fact extensively, and > > they have not been sued over it, I think it's a fairly > > clearly established interpretation, whether it is popular or > > not (but of course it's n

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Michael Sparks
On Wednesday 28 Dec 2005 17:58:33, Robert Kern wrote: > ... Sorry to reply to the thread so late in the day, but I noticed (via QOTW :-( ) that Anton got worked up at me suggesting that congratulating someone with a new job was a nice idea (surprised me too - all the Google employees I've met have

Re: Calling GPL code from a Python application

2006-01-04 Thread Ernst Noch
Heiko Wundram wrote: > Terry Hancock wrote: > >>Given that Google has been using this fact extensively, and >>they have not been sued over it, I think it's a fairly >>clearly established interpretation, whether it is popular or >>not (but of course it's not a legal precedent until somebody >>does

Re: Microsoft IronPython?

2006-01-04 Thread Ray
Kay Schluehr wrote: > At least for Jython we already know from the Jython homepage that it is > the great hope of the Java platform to survive in future and far > beyond. Yeah except that it's coming on so slow... we were doing some scripting for our Java app and Groovy won because Jython has been

[OT] How can I change Debian's default Python version?

2006-01-04 Thread Franz GEIGER
When I call the Python interpreter, the Python 2.4.1 version is called, because I installed it weeks ago from source by myself. That means the symlink /usr/bin/python points to 2.4. Fine. Now, when I install Python packages using the convenient Synaptic Package Manager, everything goes into the 2.

Re: About zipfile on WinXP

2006-01-04 Thread Justin Ezequiel
here's a small script I wrote and use note the line arcname = os.path.splitdrive(p)[-1].lstrip(os.sep) if I comment out `.lstrip(os.sep)`, I get a zip file like rzed describes ### import sys import zipfile import time import os if __name__ == '__main__': pths = sy

Re: Calling GPL code from a Python application

2006-01-04 Thread Heiko Wundram
Ernst Noch wrote: > Heiko Wundram wrote: >> Terry Hancock wrote: >>>Given that Google has been using this fact extensively, and >>>they have not been sued over it, I think it's a fairly >>>clearly established interpretation, whether it is popular or >>>not (but of course it's not a legal precedent

Re: Calling GPL code from a Python application

2006-01-04 Thread Heiko Wundram
Heiko Wundram wrote: > ..., unless I convince the > people at my univ to _release_ the code I've written under a > GPL-compatible open source license itself. The can of worms in this is basically that management at my uni doesn't want employees to take the software home and release it there, which

Re: [OT] How can I change Debian's default Python version?

2006-01-04 Thread Ganesan Rajagopal
> Franz GEIGER <[EMAIL PROTECTED]> writes: > Now, when I install Python packages using the convenient Synaptic Package > Manager, everything goes into the 2.3-directory-tree. How can I change > that? That's because synaptic installs packages compiled for the default debian python. You have tw

Re: [OT] How can I change Debian's default Python version?

2006-01-04 Thread Heiko Wundram
Franz GEIGER wrote: > Now, when I install Python packages using the convenient Synaptic Package > Manager, everything goes into the 2.3-directory-tree. How can I change > that? Simply put: not at all. Less simply put: packages compiled for the in-tree version of Python _might_ be binary compatibl

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-04 Thread Nicola Musatti
Peter Hansen wrote: > Steven D'Aprano wrote: > > Life is a process, not a thing -- > > when a clock runs down and stops ticking, there is no essence of ticking > > that keeps going, the gears just stop. When I stop walking, there is no > > spirit of walk that survives me coming to a halt. I just s

memory leak in aggdraw

2006-01-04 Thread Alexander 'boesi' Bösecke
Hi I tried to use the aggdraw module, but ... With Python 2.4.2 und aggdraw 1.1 the following code produces a memory leak. With Python 2.3.5 and aggdraw 1.2a1 it works, but unfortunately on the effbot-site there is only a version of aggdraw compiled for Python 2.3. ---snip--- import aggdraw p =

Re: Translate this to python?

2006-01-04 Thread Bengt Richter
On 3 Jan 2006 17:42:44 -0800, "KraftDiner" <[EMAIL PROTECTED]> wrote: >I'm porting a routing from C++ to python. >There is a complex for loop that I don't know how to code in python > >for (i = nPoints-1, j = 0; j < nPoints; i = j, j++) > Perhaps most directly comparable semantics (untested): i =

Re: Calling GPL code from a Python application

2006-01-04 Thread Tim Churches
Steven D'Aprano wrote: > On Wed, 04 Jan 2006 14:57:58 +1100, Tim Churches wrote: > > >>Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> >>>In particular: >>> >>>http://www.gnu.org/licenses/gpl-faq.html >>> >>>[quote] >>> >>>Q: If a library is released under the GPL (not the LGPL), does that mean >>>

Re: check if class really implements api?

2006-01-04 Thread Karsten W.
Terry Hancock schrieb: > You want: > [...] > Zope 3.x: > zope.interface.verify > This is exactly what I was looking for! There is a function verifyClass and there is a TestCase for verify.py which teaches how to use it. Thanks a lot! Karsten. -- http://mail.python.org/mailman/listinfo/python-

Re: Try Python update

2006-01-04 Thread [EMAIL PROTECTED]
> I think that the code constructor (types.CodeType) doesn't take > co_freevars or co_cellvars as an arg, so I can't directly create a new > code object from the attribute of the old one with co_freevars and > co_cellvars. Yay for hidden documentation: "code(argcount, nlocals, stacksize, flags, c

Re: Why is 'None' not assignable but 'True'/'False' are?

2006-01-04 Thread Antoon Pardon
On 2006-01-02, Alex Martelli <[EMAIL PROTECTED]> wrote: > Rodney Maxwell <[EMAIL PROTECTED]> wrote: > >> In Python 2.4.1: >> >> >>> None = 99 >> SyntaxError: assignment to None >> >>> True = 99 >> >>> False = 99 >> >>> True == False >> True >> --- >> So why is 'None' special? >

Re: itertools.izip brokeness

2006-01-04 Thread Tom Anderson
On Wed, 4 Jan 2006, Raymond Hettinger wrote: > [EMAIL PROTECTED] wrote: > >> The whole point of using izip is to make the code shorter, more >> concise, and easier to write and understand. > > That should be the point of using anything in Python. The specific goal > for izip() was for an iterat

Re: [OT] How can I change Debian's default Python version?

2006-01-04 Thread Diez B. Roggisch
Franz GEIGER wrote: > When I call the Python interpreter, the Python 2.4.1 version is called, > because I installed it weeks ago from source by myself. That means the > symlink /usr/bin/python points to 2.4. Fine. > > Now, when I install Python packages using the convenient Synaptic Package > Man

Re: Calling GPL code from a Python application

2006-01-04 Thread Tom Anderson
On Wed, 4 Jan 2006, Mike Meyer wrote: > Terry Hancock <[EMAIL PROTECTED]> writes: > >> It is interesting to note that the FSF holds the position that the >> language that "gives you this right" *doesn't* -- it just clarifies the >> fact that you already hold that right, because it is provided by

Re: Try Python update

2006-01-04 Thread Bas
To expand on this idea: You could somehow combine the official tuturial (or any other good introductory text) and make all the examples in the text 'live'. Maybe use a split screen with the tutorial text on one side and the trypython console on the other. The newbie could then immediately try the

inline function call

2006-01-04 Thread Riko Wichmann
hi everyone, I'm googeling since some time, but can't find an answer - maybe because the answer is 'No!'. Can I call a function in python inline, so that the python byte compiler does actually call the function, but sort of inserts it where the inline call is made? Therefore avoiding the funct

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Ilias Lazaridis
Alex Martelli wrote: > Ilias Lazaridis <[EMAIL PROTECTED]> wrote: [...] >>possibly one can provide the code for something similar to the ruby >>attr_accessor: >> >>class Talker >> def sayHello >> puts "Hello world" >> end >> >> attr_accessor :name, :age >> >>end >> >>thus they can later

Python 2.4 - Help does not work in Windows

2006-01-04 Thread stuart_white_
I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the new version of Python seems to be running correctly, I can't seem access the help from the interpreter. On Python 2.3.3 --- Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 Type "help"

Re: Python 2.4 - Help does not work in Windows

2006-01-04 Thread Robert Hicks
[EMAIL PROTECTED] wrote: > Could anyone give me some pointers on where I might look to debug this > problem? In case it's any help, I'm running Windows XP SP2, and have > installed both Python2.3 and Python 2.4 on the same system. Could this > be causing some conflict? > It must be. I just tried

Re: Translate this to python?

2006-01-04 Thread pyguy2
For some reason, ocassionally when I see xrange, I think "But wasn't that deprecated since range is now a . . oh wait that's xreadlines". xrange is a cool thing the few times where you really need it. john > Not sure what i is really for, but j seems to be independent, > so perhaps (also untes

Re: Photogallery written in Python?

2006-01-04 Thread Fuzzyman
A useful one that generates *static* html pages, is the gallery plugin for rest2web. http://www.voidspace.org.uk/python/rest2web/reference/gallery.html It functions as a standalone gallery, generating pages (and thumbnails etc) from templates. While not so fully featured as a dynamic gallery app

Re: - Requesting Comments for Process Definition and Presentation

2006-01-04 Thread Ilias Lazaridis
Gerard Flanagan wrote: > Ilias Lazaridis wrote: > > >>comp.lang.python / comp.lang.ruby >> >>- >> >>I would like to ask for feedback on the Process Definition and Presentation. >> >>Essentially this is exactly what I've myself specialized to do. >> >>But I cannot apply the process to my own syste

Re: inline function call

2006-01-04 Thread M1st0
I think it does'n exists. But should be. You can also roll up your own using some templating library.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft IronPython?

2006-01-04 Thread Kent Johnson
Ray wrote: > Kay Schluehr wrote: > >>At least for Jython we already know from the Jython homepage that it is >>the great hope of the Java platform to survive in future and far >>beyond. > > > Yeah except that it's coming on so slow... we were doing some scripting > for our Java app and Groovy wo

Re: memory usage of a specific function

2006-01-04 Thread Sverker Nilsson
Hermann Maier wrote: > hi, > > i need to find out the memory usage of a specific function that i use in > my program. this function does some recursive calculations and i want my > program to display the amount of memory the function used to calculate a > specific value. > > thx I was thinking th

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-04 Thread Piet van Oostrum
> [EMAIL PROTECTED] (U) wrote: >U> While preparing a Python411 podcast about classes and OOP, my mind >U> wondered far afield. I found myself constructing an extended metaphor >U> or analogy between the way programs are organized and certain >U> philosophical ideas. So, going where my better a

Re: Filename case-insensitivity on OS X

2006-01-04 Thread Piet van Oostrum
> Doug Schwarz <[EMAIL PROTECTED]> (DS) wrote: >DS> In article <[EMAIL PROTECTED]>, >DS> Tom Anderson <[EMAIL PROTECTED]> wrote: >>> Afternoon all, >>> >>> MacOS X seems to have some heretical ideas about the value of case in >>> paths - it seems to believe that it doesn't exist, more or l

Re: Filename case-insensitivity on OS X

2006-01-04 Thread Maarten
Piet van Oostrum wrote: > It seems that with Tiger, HFS+ can be made case-sensitive. I haven't seen > it, only read about it. Yes, indeed, that is possible. I tried it, once. Right now I'm using the case insensitive version again, which should tell you how well it works - the canon utilities of my

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Anton Vredegoor
Michael Sparks wrote: > Sorry to reply to the thread so late in the day, but I noticed (via > QOTW :-( ) that Anton got worked up at me suggesting that congratulating > someone with a new job was a nice idea (surprised me too - all the > Google employees I've met have been very nice people), read

Re: Application architecture (long post - sorry)

2006-01-04 Thread David Nemeth
[EMAIL PROTECTED] wrote: > Ok then, web it is, One weakness in the web architecture is retrieving and sending data when there is no wireless signal (will your techs be working in basements, for example?) Some browsers do support "working offline", but I don't know if that's adequate for this ap

Re: inline function call

2006-01-04 Thread Diez B. Roggisch
Riko Wichmann wrote: > Can I call a function in python inline, so that the python byte compiler > does actually call the function, but sort of inserts it where the inline > call is made? Therefore avoiding the function all overhead. No. That is simply impossible in python as well as in java where

Re: Microsoft IronPython?

2006-01-04 Thread Dave Benjamin
On Wed, 4 Jan 2006, Kent Johnson wrote: > Ray wrote: >> Kay Schluehr wrote: >> >>> At least for Jython we already know from the Jython homepage that it is >>> the great hope of the Java platform to survive in future and far >>> beyond. >> >> Yeah except that it's coming on so slow... we were doi

Re: Microsoft IronPython?

2006-01-04 Thread Ray
Kent Johnson wrote: > That's a hoot! Of course you can choose what language you like, but to > choose Groovy over Jython because it is more developed is mind-boggling! > > Jython 2.1 has been released, stable and suitable for production use for > many years. The Groovy community was still working o

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-04 Thread Fuzzyman
Our psyche is formed by external forces, and only exists in interaction with them. (Our inner self is not separate from our external influences). As we are part of something bigger than ourselves, the death of our physical body is not an end to the 'psychological' forces that we perceive to be our

Re: Calling GPL code from a Python application

2006-01-04 Thread Grant Edwards
On 2006-01-04, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> Personally, I agree with the FSF - if own a copy of a program, >> executing it should be fair use. Without that, then there's no >> point in obtaining software - you have to get the copyright >> holders permission to execute the stuff an

Re: Calling GPL code from a Python application

2006-01-04 Thread Peter Hansen
Mike Meyer wrote: > I believe there is precedent that contradicts the FSF's > position. There are two arguments against it: > ... > 2) Executing a program is analogous to a performance of the software. >Copyright includes limits on performances, so the copyright holder >can place limits on

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-04 Thread Peter Hansen
Nicola Musatti wrote: > Yet all these examples appear to me to be better explained as instances > of a form of physiological or psichological inertia than as indications > of the existence of some form of meta reality. But can you define "physiological or psychological inertia" in such a way that

Re: inline function call

2006-01-04 Thread Riko Wichmann
> Do you have an actual use-case for that? I mean, do you have code that runs > slow, but with inlined code embarrassingly faster? Well, I guess it would not actually be embarrassingly faster. From trying various things and actually copying the function code into the DoMC routine, I estimate to

Re: how-to POST form data to ASP pages?

2006-01-04 Thread livin
Dennis, Alan, Mike... help? According to the HomeSeer (I'm trying to trigger events on the HomeSeer application) documentation I do not need to use ASP. The simple HTTP command should be accepted directly from a HTML page. Here's the page in the online manual for Homeseer with the info: HomeSe

Re: inline function call

2006-01-04 Thread Peter Hansen
Riko Wichmann wrote: > Can I call a function in python inline, so that the python byte compiler > does actually call the function, but sort of inserts it where the inline > call is made? Therefore avoiding the function all overhead. I know a simple technique that could should basically avoid the

Re: inline function call

2006-01-04 Thread Rocco Moretti
Riko Wichmann wrote: > hi everyone, > > I'm googeling since some time, but can't find an answer - maybe because > the answer is 'No!'. > > Can I call a function in python inline, so that the python byte compiler > does actually call the function, but sort of inserts it where the inline > call

Re: inline function call

2006-01-04 Thread Peter Hansen
Riko Wichmann wrote: > def riskfunc(med, low, high): > if med != 0.0: > u = random() > try: > if u <= (med-low)/(high-low): > r = low+sqrt(u*(high-low)*(med-low)) > else: > r = high - sqrt((1.0-u)*(high-low)*(high-me

Re: inline function call

2006-01-04 Thread Stuart D. Gathman
On Wed, 04 Jan 2006 13:18:32 +0100, Riko Wichmann wrote: > I'm googeling since some time, but can't find an answer - maybe because > the answer is 'No!'. > > Can I call a function in python inline, so that the python byte compiler > does actually call the function, but sort of inserts it where

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Alex Martelli
Ilias Lazaridis <[EMAIL PROTECTED]> wrote: ... > >> attr_accessor :name, :age ... > I would need this python "attr_accessor", to showcase that python is > capable to do it (even if the usage seems irrational/redundant). The code for it was in one of my previous posts, in more than one for

Re: OT: Degrees as barriers to entry [was Re: - E04 - Leadership! Google, Guido van Rossum, PSF]

2006-01-04 Thread Alex Martelli
Brian van den Broek <[EMAIL PROTECTED]> wrote: > (I do realize that US data isn't most pertinent to Steven, Alex or > myself -- au, it, ca -- but it is ready to hand. Shamefully, my Actually, I've been living in the US for over 9 months now, and like all immigrants I have more dealings with law

Re: Python article in Free Software Magazine

2006-01-04 Thread Kirk Strauser
Terry Hancock wrote: > I find that it's not difficult to explain Python object handling if you > simply insist on the concept of "name binding" instead of "variable > assignment": That was a pretty good explanation. I'll probably use that next time. > Makes for a nice figure, too, which Fre

Re: inline function call

2006-01-04 Thread Riko Wichmann
Hey guys, thanks for all the quick replies! In addition to the tips Peter and Stuart gave me above, I also followed some of the hints found under http://wiki.python.org/moin/PythonSpeed/PerformanceTips That greatly improved performance from about 3 minutes initially (inner loop about 2000, out

Re: How to generate (enumerate) 2**N tuples representing all vertices of unit hypercube in N-dimensional hyperspace ?

2006-01-04 Thread Dr. Colombes
Paul, Heiko: Thank you for the quality, parsimony and promptness of your excellent suggestions. I wasn't familiar with the Python "yield" function. Dr. Colombes -- http://mail.python.org/mailman/listinfo/python-list

wxPython / Mac / unicode

2006-01-04 Thread isthar
Hi! I can not present unicode string in wxPython application utf-8 string: SomeProductName® here is how I converted it from iso8859-18 reference = unicode (reference,'iso8859_15').encode('utf-8') Traceback (most recent call last): File "/Users/isthar/Documents/Projects/pyEdipEditor/MainFrame.p

inserting/retriving dates in psycopg

2006-01-04 Thread Michele Simionato
Look at this example: >>> import psycopg >>> psycopg.__version__ '1.1.19' >>> import datetime >>> today = datetime.datetime.today() >>> co = psycopg.connect('') >>> cu = co.cursor() >>> cu.execute('CREATE TABLE example (date date)') >>> cu.execute("INSERT into example VALUES (%s)", (today,)) Trac

Re: Python article in Free Software Magazine

2006-01-04 Thread Michele Simionato
Kirk Strauser: > I wrote this article which was published in Free Software Magazine: > http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/ If find funny your headline """ Zope's biggest distinguishing characteristic is how closely it models the language it is written in: Python

Re: memory usage of a specific function

2006-01-04 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Sverker Nilsson <[EMAIL PROTECTED]> writes >> i need to find out the memory usage of a specific function that i use in >> my program. this function does some recursive calculations and i want my >> program to display the amount of memory the function used to calcula

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Ilias Lazaridis
Alex Martelli wrote: > Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > attr_accessor :name, :age > >>I would need this python "attr_accessor", to showcase that python is >>capable to do it (even if the usage seems irrational/redundant). [...] - (comments, code "outside the body") > def make_

Re: Memoization and encapsulation

2006-01-04 Thread drewp
But while we're at it, how about that unhashable object problem? @memoised def func(x, i): return x[i] L = [1,2,3] print func(L, 1) # TypeError: list objects are unhashable What's the deal? My func can certainly be memoized (but possibly with a slower lookup depending on how many args are

Sharing between multiple interpreters and restricted mode

2006-01-04 Thread gabriel . becedillas
Hi, At the company I work for we've embedded Python 2.4.1 in a C++ application. We execute multiple scripts concurrenlty, each one in its own interpreter (created using Py_NewInterpreter()). We are sharing a certain instance between interpreters because its to expensive to instantiate that class ev

Re: Calling GPL code from a Python application

2006-01-04 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Unfortunately, we've also signed an extremely one-sided pro-USA so-called > "Free Trade Agreement" which forces onto us a whole slew of really bad > Intellectual Property Laws, as well as hamstringing our nation's ability > to govern ourselves. With cop

Re: wxPython / Mac / unicode

2006-01-04 Thread Diez B. Roggisch
isthar wrote: > Hi! > I can not present unicode string in wxPython application > > utf-8 string: SomeProductName® > > here is how I converted it from iso8859-18 > reference = unicode (reference,'iso8859_15').encode('utf-8') > > Traceback (most recent call last): > File "/Users/isthar/Document

Re: How to generate (enumerate) 2**N tuples representing all vertices of unit hypercube in N-dimensional hyperspace ?

2006-01-04 Thread Claudio Grondi
Heiko Wundram wrote: > Claudio Grondi wrote: > >>Heiko Wundram wrote: >> >>>def perm(n): >>> return (tuple(((1,-1)[(t>>i)%2] for i in xrange(n))) >>> for t in xrange(2L**n)) >> >>Isn't this kind of coding beeing the result of suffering from the >>post-pyContest illness syndrom? > > >

Re: Calling GPL code from a Python application

2006-01-04 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> I believe there is precedent that contradicts the FSF's >> position. There are two arguments against it: >> ... >> 2) Executing a program is analogous to a performance of the software. >>Copyright includes limits on performances, s

Re: inline function call

2006-01-04 Thread Peter Hansen
Riko Wichmann wrote: > That greatly improved performance from about 3 minutes initially (inner > loop about 2000, outer loop about 1 runs - I think) down to a few > seconds. My question on the inline function call was triggered by the 3 > minute run on a pretty small statistic (1 events)

Re: Python 2.4 - Help does not work in Windows

2006-01-04 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the > Any help would be greatly appreciated! > A data point: It is not the interaction of the two Pythons. C:\...\Py>\python23\python Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)

Re: Python as a Server vs Running Under Apache

2006-01-04 Thread fuzzylollipop
there are lots of things you can't do or can't do easily or can't do at efficiently in Apache using python as cgi or as anyone would more likely assume mod_python. anything that requires any shared state or shared resources in Apache is next to impossible. Doing similar things in an app server or n

Re: Python article in Free Software Magazine

2006-01-04 Thread Kirk Strauser
Michele Simionato wrote: > when I think Zope is the less Pythonic application I have ever seen;) You do? Why so? I'm not arguing, but that's different than my experience with it and I'm curious about how you reached that conclusion. -- Kirk Strauser -- http://mail.python.org/mailman/listinfo/

Missive

2006-01-04 Thread nikool19a
FRIEND, As are you, Brandon and www.ChezBrandon.com are intelligent and awesome. May you have an awesome day. A succinct warning: Elements of the Mossad, sated with cash from the murderous and destructive narcotics trade -- for example, according to Reader's Digest, cocaine alone costs US busine

Re: Calling GPL code from a Python application

2006-01-04 Thread Grant Edwards
On 2006-01-04, Mike Meyer <[EMAIL PROTECTED]> wrote: >> So is putting that program behind a web server and letting >> others execute it. > > That's pretty clearly a public performance. One has to wonder > whether or not the exemption for program execution would apply > to such? I don't think it n

Re: inline function call

2006-01-04 Thread bearophileHUGS
Peter Hansen>but I'd be happy to see a real-world case where Psyco gave a much bigger boost.)< Psyco can be very fast, but: - the program has to be the right one; - you have to use "low level" programming, programming more like in C, avoiding most of the nice things Python has, like list generator

Re: [OT] How can I change Debian's default Python version?

2006-01-04 Thread F. GEIGER
Diez B. Roggisch wrote: > Franz GEIGER wrote: > >> When I call the Python interpreter, the Python 2.4.1 version is called, >> because I installed it weeks ago from source by myself. That means the >> symlink /usr/bin/python points to 2.4. Fine. >> >> Now, when I install Python packages using the

Re: Calling GPL code from a Python application

2006-01-04 Thread Mike Meyer
Heiko Wundram <[EMAIL PROTECTED]> writes: >> Heiko Wundram <[EMAIL PROTECTED]> writes: >>> The stance the FSF (and it's lawyers) take on this is that it is illegal >>> to dynamically link applications that are not under a GPL-compatible >>> license to GPL works >> I doubt that, because it's simply

Re: [OT] How can I change Debian's default Python version?

2006-01-04 Thread F. GEIGER
Ganesan Rajagopal wrote: >> Franz GEIGER <[EMAIL PROTECTED]> writes: > >> Now, when I install Python packages using the convenient Synaptic Package >> Manager, everything goes into the 2.3-directory-tree. How can I change >> that? > > That's because synaptic installs packages compiled for th

Re: Calling GPL code from a Python application

2006-01-04 Thread Mike Meyer
Heiko Wundram <[EMAIL PROTECTED]> writes: > I've asked TrollTech more than once for their stance on this, and each time > they have told me that it's illegal for me to develop an inhouse > application (such as a frontend to some webapp I've written that's only > used by us and will never ever be gi

Your message to theseptemberproject awaits moderator approval

2006-01-04 Thread theseptemberproject-bounces
Your mail to 'theseptemberproject' with the subject hi,_ive_a_new_mail_address Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive n

Is 'everything' a refrence or isn't it?

2006-01-04 Thread KraftDiner
I was under the assumption that everything in python was a refrence... so if I code this: lst = [1,2,3] for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.. (After reading that 'everything' is a refrence.) so it seems that in order to do this I need to

Re: Python article in Free Software Magazine

2006-01-04 Thread Claudio Grondi
Kirk Strauser wrote: > Michele Simionato wrote: > > >>when I think Zope is the less Pythonic application I have ever seen;) > > > You do? Why so? I'm not arguing, but that's different than my experience > with it and I'm curious about how you reached that conclusion. I can remeber, that I had

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Christian Tismer
KraftDiner wrote: > I was under the assumption that everything in python was a refrence... This is true. > so if I code this: > lst = [1,2,3] lst is a reference to a list that holds references to 1, 2, and 3 > for i in lst: i is a reference to every element in the list, one ofter the other. Bu

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Grant Edwards
On 2006-01-04, KraftDiner <[EMAIL PROTECTED]> wrote: > I was under the assumption that everything in python was a refrence... It is. > so if I code this: > lst = [1,2,3] > for i in lst: >if i==2: > i = 4 > print lst > > I though the contents of lst would be modified.. Nope. "i = 4" d

Re: Try Python update

2006-01-04 Thread Mike Meyer
"Bas" <[EMAIL PROTECTED]> writes: > You could somehow combine the official tuturial (or any other good > introductory text) and make all the examples in the text 'live'. Maybe > use a split screen with the tutorial text on one side and the trypython > console on the other. The newbie could then imm

Why doesn't this work--Extending Python--?

2006-01-04 Thread jeremito
I have written a simple C++ program in my efforts to learn how to extend Python. It is shown below. Everything compiles and installs correctly, but I get strange answers. I know the function "Pi" is correct because when I call it from a C++ code it gives the correct answers. This is what I get

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Duncan Booth
KraftDiner wrote: > I was under the assumption that everything in python was a refrence... It is, although it is better to think in terms of names and bindings. > > so if I code this: > lst = [1,2,3] > for i in lst: >if i==2: > i = 4 > print lst > > I though the contents of lst would

Re: Calling GPL code from a Python application

2006-01-04 Thread Heiko Wundram
Mike Meyer wrote: > I can't see how they could *require* you to release the code. The GPL > certainly doesn't (or didn't) require that. Possibly they have a > GPL-compatible license that adds that requirement. See my additional comment on why our management thinks this is bad even when I only use

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Scott David Daniels
KraftDiner wrote: > Have I misunderstood something? yes. There is a reason people talk about names and bindings. -- -Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Simon Brunning
On 4 Jan 2006 10:54:17 -0800, KraftDiner <[EMAIL PROTECTED]> wrote: > I was under the assumption that everything in python was a refrence... (snip) > Have I misunderstood something? Yup. The concept if a reference is, I find, sometimes an unhelpful one in Python. Reset your brain -

Re: Calling GPL code from a Python application

2006-01-04 Thread Tim Churches
Mike Meyer wrote: >> So is putting that program behind a web server and letting others >>execute it. > > That's pretty clearly a public performance. One has to wonder whether > or not the exemption for program execution would apply to such? Of > course, in cases where it matters (i.e. - I provide

Re: Calling GPL code from a Python application

2006-01-04 Thread Ernst Noch
Mike Meyer wrote: > Heiko Wundram <[EMAIL PROTECTED]> writes: > >>I've asked TrollTech more than once for their stance on this, and each time >>they have told me that it's illegal for me to develop an inhouse >>application (such as a frontend to some webapp I've written that's only >>used by us an

Re: Calling GPL code from a Python application

2006-01-04 Thread Ernst Noch
Mike Meyer wrote: > In my case, I get paid for building custom applications. If I use > GPL'ed software, I'm required to give my client the software under the > GPL (or, as you point out, a GPL-compatible license). I never bother - > I hand them a tarball and installation instructions and they ins

Re: Try Python update

2006-01-04 Thread Szabolcs Nagy
Hello Thanks for trypython, it's a cool idea I got TryPythonError after an IdentationError and i could not get rid of it (other than refreshing the page): Python 2.4.2 (#3, Dec 16 2005, 23:54:20) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits", or "license" for mor

urllib2 and proxies support ?

2006-01-04 Thread tomazi75-nospam(at)gmail.com
Hello all, I've a problem using urllib2 with a proxy which need authentication. I've tested the 'simple way' : -- code -- import urllib # example values for the post my_url = 'http://www.python.org' proxy_info = { 'host' : 'netcache.monentreprise.com', 'port' : 3128,

  1   2   >