PyCon schedule available

2006-01-04 Thread A.M. Kuchling
A close-to-final draft of the PyCon 2006 schedule has now been posted to the web: http://www.python.org/pycon/2006/schedule If you're a presenter, please check that your timeslot is OK for you, and let us know if there's a problem. Regards, A.M. Kuchling [EMAIL PROTECTED]

PyCon early-bird registration extended until January 15th

2006-01-04 Thread A.M. Kuchling
Due to various issues with the hotel's reservation desk, the early bird registration for PyCon has been extended until January 15th. So, if you've been delaying registering for PyCon, you still have a chance to register at the lower early-bird price. The registration form is at

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 end of the

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), (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 not

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

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)[(ti)%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 posted is the

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:

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 sue and

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

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 =

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 until somebody

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 two

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 stop

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: 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,

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? A legacy/backwards compatibility

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 Manager,

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 fair

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 be accessed this way

Re: Python 2.4 - Help does not work in Windows

2006-01-04 Thread Robert Hicks
[EMAIL PROTECTED] wrote: snip 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: - 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 system. I ask here, as I

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 angels dare

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 less, so touch foo FOO

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 the

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

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 doing some scripting

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 on

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

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 anyway.

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 the

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:

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 is

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-med))

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 the

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 form, but

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

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 Free

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,

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

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,)) Traceback (most recent call

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 calculate a

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

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

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 copyright

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

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)[(ti)%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

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, so the

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

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 --

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

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 needs to.

Re: inline function call

2006-01-04 Thread bearophileHUGS
Peter Hansenbut 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 generators,

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 convenient

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 not true. I can

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 the default debian

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 given

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

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 took a

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. But

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 doesn't

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

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 be

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 public

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 and will

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

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 more

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,

Re: Calling GPL code from a Python application

2006-01-04 Thread Ernst Noch
Heiko Wundram wrote: 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

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

2006-01-04 Thread Todd
jeremito wrote: 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.

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

2006-01-04 Thread jeremito
Well what do you know, that worked! It's one of those errors that you can't see yourself, but someone else can see it instantly. Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Memoization and encapsulation

2006-01-04 Thread Tom Anderson
On Wed, 4 Jan 2006 [EMAIL PROTECTED] wrote: I think python is broken here-- why aren't lists hashable, or why isn't there a straightforward way to make memoised() work? a = [1, 2, 3] d = {a: foo} a[0] = 0 print d[a] I feel your pain, but i don't think lists (and mutable objects generally)

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

2006-01-04 Thread Claudio Grondi
KraftDiner wrote: 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

Re: Visualisation Engine for Python

2006-01-04 Thread Gerard Flanagan
rodmc wrote: I am looking for a 2D data visualisation or graphics library for Python. Can anyone point me in the right direction? Thanks in advance, rod http://www.mps.mpg.de/dislin/ (Scientific Plotting Software) Gerard -- http://mail.python.org/mailman/listinfo/python-list

Re: Hypergeometric distribution

2006-01-04 Thread Raven
Cameron Laird wrote: This thread confuses me. I've lost track of the real goal. If it's an exact calculation of binomial coefficients--or even one of several other potential targets mentioned--I echo Steven D'Aprano, and ask, are you *sure* the suggestions already offered aren't adequate?

Re: Microsoft IronPython?

2006-01-04 Thread Luis M. González
Oh, yeah, that's undoubtedly true. What I was referring to were things such as using [] for generic, that doesn't exist in current CPython does it? I'm not en expert on the subject, but I guess that any language implementation running on .Net should be able to at least understand generics or

Win32 Binary-only for 2.3.x?

2006-01-04 Thread dumpingrounds
Hi, I must be going nutty, but I can't seem to find anywhere where I can get just the binaries for, say, 2.3.5 for win32. I've googled high and low and all I come up with is installer (MSI/EXE) binaries and the source code. They have to be somewhere. I cant be the only person that doesn't want

Re: memory usage of a specific function

2006-01-04 Thread Sverker Nilsson
Stephen Kellett wrote: In message [EMAIL PROTECTED], Sverker Nilsson [EMAIL PROTECTED] writes [Note that actually it was Hermann Maier that wrote the following but as quoted, it may look like it was I that wrote it.] i need to find out the memory usage of a specific function that i use

Re: Hypergeometric distribution

2006-01-04 Thread Paul Rubin
Raven [EMAIL PROTECTED] writes: The problem with Stirling's approximation is that I need to calculate the hypergeometric hence the factorial for numbers within a large range e.g. choose(14000,170) or choose(5,2) Stirling's approximation to second order is fairly accurate even at low values:

Re: inline function call

2006-01-04 Thread Riko Wichmann
Hi Peter, Riko, any chance you could post the final code and a bit more detail on exactly how much Psyco contributed to the speedup? The former would be educational for all of us, while I'm personally very curious about the latter because my limited attempts to use Psyco in the past have

  1   2   >