Vilnius/Post EuroPython PyPy Sprint 12-14th of July

2007-06-22 Thread Michael Hudson
The PyPy team is sprinting at EuroPython again and we invite you to participate in our 3 day long sprint at the conference hotel - Reval Hotel Lietuva. If you plan to attend the sprint we recommend you to listen to the PyPy technical talks (`EuroPython schedule`_) during the conference since it wi

EuroPython 2007: Call for Proposals

2007-03-25 Thread Michael Hudson
Book Monday 9th July to Wednesday 11th July 2007 in your calendar! EuroPython 2007, the European Python and Zope Conference, will be held in Vilnius, Lithuania. Last year's conference was a great success, featuring a variety of tracks, amazing lightning talks and inspiring keynotes. With your par

Ireland PyPy sprint 21th-27th August 2006

2006-07-21 Thread Michael Hudson
The next PyPy sprint will happen in the nice city of Limerick in Ireland from 21st till 27th August. (Most people intend to arrive 20th August). The main focus of the sprint will be on JIT compiler works, various optimization works, porting extension modules, infrastructure works like a buil

pypy-0.9.0: stackless, new extension compiler

2006-06-25 Thread Michael Hudson
t from numerous people. Please feel free to give feedback and raise questions. contact points: http://codespeak.net/pypy/dist/pypy/doc/contact.html have fun, the pypy team, (Armin Rigo, Samuele Pedroni, Holger Krekel, Christian Tismer, Carl Friedrich Bolz, Michael Hudson,

Post-PyCon PyPy Sprint: February 27th - March 2nd 2006

2006-02-10 Thread Michael Hudson
The next PyPy sprint is scheduled to take place right after PyCon 2006 in Dallas, Texas, USA. We hope to see lots of newcomers at this sprint, so we'll give friendly introductions. Note that during the Pycon conference we are giving PyPy talks which serve well as preparation. Goals and topi

This Week in PyPy 2

2005-11-11 Thread Michael Hudson
Introduction This is the second of what will hopefully be many summaries of what's been going on in the world of PyPy in the last week. I'd still like to remind people that when something worth summarizing happens to recommend if for "This Week in PyPy" as mentioned on: http://c

Re: visit_decref: Assertion `gc->gc.gc_refs != 0' failed.

2005-09-09 Thread Michael Hudson
"alexLIGO" <[EMAIL PROTECTED]> writes: > Hi, > > I got this error when trying to execute the following python command > with in a C module: Py_BuildValue You get that error immediately on calling that function? > Do anyone have any idea what this error is about? You've probably got your refcou

Re: Possible improvement to slice opperations.

2005-09-09 Thread Michael Hudson
Ron Adam <[EMAIL PROTECTED]> writes: > Magnus Lycka wrote: >> Ron Adam wrote: [...] >>> REVERSE ORDER STEPPING >>> -- >>> When negative steps are used, a slice operation >>> does the following. (or the equivalent) >>> >>>1. reverse the list >>>2. cut the reversed seque

Re: To the python-list moderator

2005-08-31 Thread Michael Hudson
This is probably a fairly bad way of contacting the python-list admins... "Terry Reedy" <[EMAIL PROTECTED]> writes: > For a couple of years, I have been reading and posting and posting to > python-list and c.l.p via gmane.news.orgs gmane.comp.python.general group. > Today I got this from 'pytho

Re: OpenSource documentation problems

2005-08-31 Thread Michael Hudson
"Adriaan Renting" <[EMAIL PROTECTED]> writes: > The good commercial docs are better because there it is understood > how important this is. Also, they are probably written by people who are trained technical writers which has to help at least a bit... writing good documentation is hard. Whether

Re: Precise timings ?

2005-08-30 Thread Michael Hudson
Madhusudan Singh <[EMAIL PROTECTED]> writes: > Hi > > I am using time.clock() to get the current time of the processor in seconds. > For my application, I need really high resolution but currently seem to be > limited to 0.01 second. Is there a way to specify the resolution (say 1-10 > microsecond

Re: micro-python - is it possible?

2005-08-30 Thread Michael Hudson
Magnus Lycka <[EMAIL PROTECTED]> writes: > Evil Bastard wrote: >> Hi, >> Has anyone done any serious work on producing a subset of python's >> language definition that would suit it to a tiny microcontroller >> environment? > > Isn't pypy meant to support different backends with different > requir

Re: Yielding a chain of values

2005-08-30 Thread Michael Hudson
Talin <[EMAIL PROTECTED]> writes: > I'm finding that a lot of places within my code, I want to return the > output of a generator from another generator. Currently the only > method I know of to do this is to explicitly loop over the results > from the inner generator, and yield each one: > >

Re: Release of PyPy 0.7.0

2005-08-30 Thread Michael Hudson
Michael Sparks <[EMAIL PROTECTED]> writes: > Valentino Volonghi aka Dialtone wrote: > >> Michael Sparks <[EMAIL PROTECTED]> wrote: >> >>> Would it be useful for people to start trying out their modules/code to >>> see if they work with this release, and whether they can likewise be >>> translated

Re: Bug in slice type

2005-08-18 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Michael Hudson wrote: >> Bryan Olson writes: >> In some sense; it certainly does what I intended it to do. > > [...] >> I'm not going to change the behaviour. The docs probably aren't >> especially clear, thoug

Re: Urgent: Embedding Python problems - advice sought

2005-08-17 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Does anyone have advice on other groups, sites etc that has knowledge > of this subject ? I've just replied to your original post, having not seen it the first time around. Cheers, mwh -- w00t w00t w00t w00t! I don't understand all of the code, but it works!

Re: Urgent: Embedding Python problems - advice sought

2005-08-17 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Hi, > > > I am embedding Python into a multi-threaded C++ application running on > Solaris and need urgent clarification on the embedding architecture and > its correct usage (as I am experience weird behaviors). What version of Python are you using? > Can anyone clar

Re: extending: new type instance

2005-08-17 Thread Michael Hudson
"BranoZ" <[EMAIL PROTECTED]> writes: > I'm writing my own (list-like) type in C. It is implementing > a Sequence Protocol. In 'sq_slice' method I would like to return > a new instance of my class/type. > > How do I create (and initialize) an instance of a given > PyTypeObject MyType ? > > I have t

Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Michael Hudson
Simon Brunning <[EMAIL PROTECTED]> writes: > I think that copy is very rarely used. I don't think I've ever imported it. > > Or is it just me? Not really. I've used it once that I can recall, to copy a kind of generic "default value", something like: def value(self, v, default): if hasattr(

Re: __del__ pattern?

2005-08-16 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Chris Curvey wrote: >> I need to ensure that there is only one instance of my python class on >> my machine at a given time. (Not within an interpreter -- that would >> just be a singleton -- but on the machine.) These instances are >> created and destroyed, but there

Re: __del__ pattern?

2005-08-15 Thread Michael Hudson
"Chris Curvey" <[EMAIL PROTECTED]> writes: > I need to ensure that there is only one instance of my python class on > my machine at a given time. I recommend modifying your requirements such that you ensure that there is only one "active" instance of your class at any one time (or something like

Re: Python's Exception, and Capitalization

2005-08-15 Thread Michael Hudson
"Ray" <[EMAIL PROTECTED]> writes: > D H wrote: >> Yeah, the python standard library has been built by lots of different >> people. It wasn't designed by one entity using one standard like the >> java standard library or .NET/Mono class library. > > Um, OK, so is it customary in modern Python prog

Re: Bug in slice type

2005-08-12 Thread Michael Hudson
Bryan Olson <[EMAIL PROTECTED]> writes: > The Python slice type has one method 'indices', and reportedly: > > This method takes a single integer argument /length/ and > computes information about the extended slice that the slice > object would describe if applied to a sequence of l

Re: signals (again)

2005-08-11 Thread Michael Hudson
"bill" <[EMAIL PROTECTED]> writes: > I see this (or similar) question occasionally looking back through the > archive, but haven't yet seen a definitive answer, so I'm going to ask > it again. > > Consider the following: > > while True: > do_something_to_files_in_directory(fd) > fcntl(fd,

Re: Memory leak in PyImport_ReloadModule - URGENT

2005-08-11 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Having recently upgraded to Python 2.4, I am having a large memory > leak with the following code built with VC++ 6.0: > > PyObject *pName, *pModule; > > Py_Initialize(); > pName = PyString_FromString(argv[1]); > >

Re: Syntax error after upgrading to Python 2.4

2005-08-10 Thread Michael Hudson
Reinhold Birkenfeld <[EMAIL PROTECTED]> writes: > Michael Hudson wrote: >> [EMAIL PROTECTED] writes: >> >>> On Sat, Aug 06, 2005 at 05:15:22PM -0400, Terry Reedy wrote: >>>> In any case letting developers add new features is part of the price of >&

Re: Python -- (just) a successful experiment?

2005-08-09 Thread Michael Hudson
Michael Hudson <[EMAIL PROTECTED]> writes: > Robert Kern <[EMAIL PROTECTED]> writes: > >> What I'm trying to say is that posting to c.l.py is absolutely >> ineffective in achieving that goal. Code attracts people that like >> to code. Tedious, repetitiv

Re: Python -- (just) a successful experiment?

2005-08-09 Thread Michael Hudson
Robert Kern <[EMAIL PROTECTED]> writes: > What I'm trying to say is that posting to c.l.py is absolutely > ineffective in achieving that goal. Code attracts people that like > to code. Tedious, repetitive c.l.py threads attract people that like > to write tedious, repetitive c.l.py threads. +1 QO

Re: Decline and fall of scripting languages ?

2005-08-08 Thread Michael Hudson
Donn Cave <[EMAIL PROTECTED]> writes: > On the contrary, there are a couple. Ghc is probably the > leading implementation these days, and by any reasonable > measure, it is serious. > > Objective CAML is indeed not a pure functional language. *cough* unsafePerformIO *cough* Cheers, mwh -- M

Re: Syntax error after upgrading to Python 2.4

2005-08-08 Thread Michael Hudson
[EMAIL PROTECTED] writes: > On Sat, Aug 06, 2005 at 05:15:22PM -0400, Terry Reedy wrote: >> In any case letting developers add new features is part of the price of >> getting unpaid bug fixes for free software. But note that PSF does not >> make you to upgrade. Here is the current list of poss

Re: Py: a very dangerous language

2005-08-05 Thread Michael Hudson
Benjamin Niemann <[EMAIL PROTECTED]> writes: > Luis M. Gonzalez wrote: > >> This is great! >> It's absolutely useless, like a real therapist, but it's free! > > Never heard of Eliza? Even Emacs has it built in (Menu Help -> Emacs > Psychiatrist). M-x psy return Cheers, mwh -- Gullible editor

Re: Art of Unit Testing

2005-08-05 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message > news:[EMAIL PROTECTED] >> I knew there was some other one before unittest came along but I thought >> unittest was supposed to replace the older stuff. > > I believe unittest was an altern

Re: Is this Pythonic?

2005-08-02 Thread Michael Hudson
[EMAIL PROTECTED] (phil hunt) writes: >>It would (possibly) be more Pythonic to >>define an interface instead, > > Does Python have the concept of an interface? When was that added? It doesn't have one included, but there are at least two implementations, zope.interface and PyProtocols (I'm sure

Re: Is this Pythonic?

2005-08-02 Thread Michael Hudson
[EMAIL PROTECTED] (phil hunt) writes: > Suppose I'm writing an abstract superclass which will have some > concrete subclasses. I want to signal in my code that the subclasses > will implement certan methods. Is this a Pythonic way of doing what > I have in mind: > > class Foo: # abstract superc

Re: Changing interpreter's deafult output/error streams

2005-08-01 Thread Michael Hudson
Robert Kern <[EMAIL PROTECTED]> writes: > Michael Hudson wrote: >> "Ira" <[EMAIL PROTECTED]> writes: >> >>>OK let me rephrase, >>> >>>the standard error stream (and if I'm not mistaken also the one that >>>PyErr_P

Re: Changing interpreter's deafult output/error streams

2005-08-01 Thread Michael Hudson
"Ira" <[EMAIL PROTECTED]> writes: > OK let me rephrase, > > the standard error stream (and if I'm not mistaken also the one that > PyErr_Print() writes to) is the python object sys.stderr. Now say I'd go > ahead and write the following in python... Ah, OK, I think you're mistaken, and PyErr_Print

Re: Changing interpreter's deafult output/error streams

2005-07-31 Thread Michael Hudson
"Ira" <[EMAIL PROTECTED]> writes: > Using an embedded interpreter, how do I change it's default output > streams (specifically the one used by PyErr_Print() which I'm > guessing is the default error stream)? It looks as though it writes to stderr unconditionally. But most of the reasons for ende

Re: Asking the user a question and giving him a default answer he can edit

2005-07-31 Thread Michael Hudson
"levander" <[EMAIL PROTECTED]> writes: > Basically, I've got a bunch of questions to ask a user, the vast > majority of which, the answer will only vary by the last few > characters. What I'd like to do is every time the user is asked a > question, give him the default answer as just whatever he a

Re: shelve: writing out updates?!

2005-07-31 Thread Michael Hudson
Robert Kern <[EMAIL PROTECTED]> writes: >> The Documentation Wiki could then be used as a basis for the >> "official" documentation that comes with each new release. >> Does this idea make some sense? Or are there hidden pitfalls? > > Yes! Someone actually has to do it! I think someone is working

Re: Ten Essential Development Practices

2005-07-29 Thread Michael Hudson
Steve Holden <[EMAIL PROTECTED]> writes: > If I canpoint out the obvious, the output from "import this" *is* > headed "The Zen of Python", so clearly it isn;t intended to be > universal in its applicability. It's also mistitled there, given that it was originally posted as '19 Pythonic Theses' an

Re: baffling error-handling problem

2005-07-28 Thread Michael Hudson
Chris Fonnesbeck <[EMAIL PROTECTED]> writes: > I thought I knew how to do error handling in python, but apparently I > dont. I have a bunch of code to calculate statistical likelihoods, and > use error handling to catch invalid parameters. For example, for the [...] > bernoulli distribution, I h

Re: What license to choose for Python programs? (PSF License vs. GPL/LGPL)

2005-07-25 Thread Michael Hudson
[EMAIL PROTECTED] (Volker Grabsch) writes: > Hi! > > I noticed that many packages in the PyPI are using the PSF License. > Does this have a special reason? Lots of people are misguided, maybe. Anyway, you want to be reading this: http://wiki.python.org/moin/PythonSoftwareFoundationLicenseFaq

Re: Hash functions

2005-07-21 Thread Michael Hudson
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Do people often use hash() on built-in types? Only implicitly. > What do you find it useful for? Dictionaries :) > How about on custom classes? Same here. > Can anyone give me some good tips or hints for writing and using > hash functions in Pyt

Re: goto

2005-07-21 Thread Michael Hudson
[EMAIL PROTECTED] writes: > >>> what is the equivalent of C languages' goto statement in python? > > >> You really shouldn't use goto. > >> Fortunately you can't. > > Steven> Of course you can :-) > > Steven> You can write your own Python interpreter, in Python, and add a >

Re: Are there any decent python memory profilers available?

2005-07-19 Thread Michael Hudson
[EMAIL PROTECTED] writes: > I have a rather large python application (uses around 40MB of memory to > start) that gradually chews up memory over many hours. I've done a > little googling around, but it looks like I'm faced with prowling > through the gc.get_objects() myself. I need a tool to ident

Re: math.nroot [was Re: A brief question.]

2005-07-15 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > [Tim] > >> Ah, but as I've said before, virtually all C compilers on 754 boxes > >> support _some_ way to get at this stuff. This includes gcc before C99 > >> and fenv.h -- if the platforms represented in fpectlmodule.c were > >> happy to use gcc, they all

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-15 Thread Michael Hudson
Grant Edwards <[EMAIL PROTECTED]> writes: > I've read over and over that Python leaves floating point > issues up to the underlying platform. Please read the conversation Tim and I are having in the "Re: math.nroot [was Re: A brief question.]" elsewhere in this same newsgroup. Cheers, mwh --

Re: math.nroot [was Re: A brief question.]

2005-07-13 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > [Michael Hudson] > > I doubt anyone else is reading this by now, so I've trimmed quotes > > fairly ruthlessly :) > > Damn -- there goes my best hope at learning how large a message gmail > can handle before blowing

Re: math.nroot [was Re: A brief question.]

2005-07-12 Thread Michael Hudson
I doubt anyone else is reading this by now, so I've trimmed quotes fairly ruthlessly :) Tim Peters <[EMAIL PROTECTED]> writes: > > Actually, I think I'm confused about when Underflow is signalled -- is it > > when a denormalized result is about to be returned or when a genuine > > zero is about t

Re: pyo contains absolute paths

2005-07-11 Thread Michael Hudson
David Siroky <[EMAIL PROTECTED]> writes: > Hi! > > When I "compile" my python files with "python -OO " into pyo files > then they still contain absolute paths of the source files which is > undesirable for me. How can I deal with that? Are you trying to save space? In 2.4 and later each cod

Re: PPC floating equality vs. byte compilation

2005-07-11 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Tim Peters" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [Donn Cave] > >> I ran into a phenomenon that seemed odd to me, while testing a > >> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e. > >> > >> test_builtin.py, for examp

Re: math.nroot [was Re: A brief question.]

2005-07-11 Thread Michael Hudson
nce of infinities, NaNs, and signed > >>>> zeroes is a platform-dependent crapshoot. > > [Michael Hudson] > >>> As you may have noticed by now, I'd kind of like to stop you saying > >>> this :) -- at least on platforms where doubles are good old-fashi

Re: frozenset question

2005-07-06 Thread Michael Hudson
Will McGugan <[EMAIL PROTECTED]> writes: > Qiangning Hong wrote: > > On 7/6/05, Will McGugan <[EMAIL PROTECTED]> wrote: > > > >>Hi, > >> > >>Are there any benefits in using a frozenset over a set, other than it > >>being immutable? > > A frozenset can be used as a key of a dict: > > Thanks, but

Re: math.nroot [was Re: A brief question.]

2005-07-05 Thread Michael Hudson
and signed > >> zeroes is a platform-dependent crapshoot. > > [Michael Hudson] > > As you may have noticed by now, I'd kind of like to stop you saying > > this :) -- at least on platforms where doubles are good old-fashioned > > 754 8-byte values. > >

Re: pickle broken: can't handle NaN or Infinity under win32

2005-07-05 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Grant Edwards" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I'm working on it. I should have said it's trivial if you have > > access to the platforms to be supported. I've tested a fix > > that supports pickle streams generated

Re: math.nroot [was Re: A brief question.]

2005-07-05 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > All Python behavior in the presence of infinities, NaNs, and signed > zeroes is a platform-dependent accident, mostly inherited from that > all C89 behavior in the presence of infinities, NaNs, and signed > zeroes is a platform-dependent crapshoot. As you

Re: Information about Python Codyng Projects Ideas

2005-06-03 Thread Michael Hudson
"M1st0" <[EMAIL PROTECTED]> writes: > I hope that here is the right place for this kind of discussion. There's a new mailing list [EMAIL PROTECTED] which is probably more appropriate for specifics, but this list is probably OK for general discussion. Cheers, mwh -- Solaris: Shire horse that

Re: What's the use of changing func_name?

2005-05-19 Thread Michael Hudson
Robert Kern <[EMAIL PROTECTED]> writes: > could ildg wrote: > > Thank you for your help. > > I know the function g is changed after setting the func_name. > > But I still can't call funciton g by using f(), when I try to do > > this, error will occur: > > > > > g.func_name="f" > print g

Re: unittest vs py.test?

2005-04-05 Thread Michael Hudson
Peter Hansen <[EMAIL PROTECTED]> writes: > Raymond Hettinger wrote: > > [Peter Hansen] > > > >>This is pretty, but I *want* my tests to be contained > >>in separate functions or methods. > > In py.test, those would read: > > def test1(): > > assert a == b > > def test2(): > > raises(Error

Re: unittest vs py.test?

2005-04-05 Thread Michael Hudson
Roy Smith <[EMAIL PROTECTED]> writes: > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Bengt Richter) > > Is there a package that is accessible without svn? > > That seems to be its weak point right now. > > Fortunately, you can get pre-built svn clients for many platforms > (http://subver

Re: Simple thread-safe counter?

2005-04-05 Thread Michael Hudson
Paul Rubin writes: > Tim Peters <[EMAIL PROTECTED]> writes: > > The GIL is your friend here: > > > > import itertools > > f = itertools.count().next > > Thanks, I was hoping something like this would work but was not sure I > could rely on it. > > > A similar

Re: long number multiplication

2004-12-06 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "I.V. Aprameya Rao" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > i have been wondering, how does python store its very long integers and > > perform aritmetic on it. Well, up until fair recently it used "high school" arithmetic in

Re: decorators ?

2004-12-02 Thread Michael Hudson
Skip Montanaro <[EMAIL PROTECTED]> writes: > Jacek> Anything you can do with decorators, you could do before (with > Jacek> the exception of rebinding the __name__ of functions). > > And while that feature was added because we realized it would be nice if the > decorated function could ha