[linked lists] Newbie - chapter 19 in "How to think like a CS in python"

2005-07-14 Thread Philip
Hi, I'm reading "How to think like a computer scientist in python". So far, it's been smooth sailing, but the final exercise in chapter 19 really has me stumped. Is it just me, or did this book get very difficult, very quickly? It says: "As an exercise, write an implementation of the Priority Queu

Help with Threading

2005-01-23 Thread Philip Smith
Hi I am fairly new to Python threading and my needs are simple(!) I want to establish a number of threads each of which work on the same computationally intensive problem in different ways. I am using the thread module rather than the threading module. My problem is I can't see how (when one t

Re: Help with Threading

2005-01-25 Thread Philip Smith
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I use threading.Thread as outlined in this recipe: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448 >Thanks -- http://mail.python.org/mailman/listinfo/python-list

Elliptic Code

2005-01-28 Thread Philip Smith
Hi Does anyone have/know of a python implementation of the elliptic curve factoring algorithm (lenstra) which is both: simply and cleanly coded functional I'm aware of William Stein's code (from elementary number theory book) but I don't understand his coding style and the algorithm doesn't se

Re: Elliptic Code

2005-01-28 Thread Philip Smith
it yet. Phil <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Philip Smith" <[EMAIL PROTECTED]> writes: >> Does anyone have/know of a python implementation of the elliptic curve >> factoring algorithm (lenstra) which is both: >> >> simply

Re: Elliptic Code

2005-01-28 Thread Philip Smith
Quite so - but thanks for your help in any case "Paul Rubin" wrote in message news:[EMAIL PROTECTED] > Nick Craig-Wood <[EMAIL PROTECTED]> writes: >> > I understand the algorithm quite well but how to code the >> > multiplication >> > stage most efficiently in python

Multiple constructors

2005-02-05 Thread Philip Smith
Call this a C++ programmers hang-up if you like. I don't seem to be able to define multiple versions of __init__ in my matrix class (ie to initialise either from a list of values or from 2 dimensions (rows/columns)). Even if Python couldn't resolve the __init__ to use on the basis of argument

Re: Multiple constructors

2005-02-06 Thread Philip Smith
Thanks to all of you Some useful ideas in there, even if some of them stretch my current knowledge of the language. C++ to Python is a steep 'unlearning' curve... Phil "Philip Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Call this a C++ pr

lambda and for that matter goto not forgetting sugar

2005-02-10 Thread Philip Smith
I've read with interest the continuing debate about 'lambda' and its place in Python. Just to say that personally I think its an elegant and useful construct for many types of programming task (particularly number theory/artificial intelligence/genetic algorithms) I can't think why anyone woul

Derived class and deepcopy

2005-02-16 Thread Philip Smith
Hi If I derive a class (eg Matrix) from list I presume this implies the classic OOP 'is a' relation between the derived and super class. I therefore presume I can use a derived class in any context that I can use the superclass. In the given example I want to apply deepcopy() to the Matrix ins

Beware complexity

2005-03-12 Thread Philip Smith
-- http://mail.python.org/mailman/listinfo/python-list

Beware complexity

2005-03-12 Thread Philip Smith
I wonder if anyone has any thoughts not on where Python should go but where it should stop? One of the faults with langauges like C++ was that so many new features/constructs were added that it became a nightmare right from the design stage of a piece of software deciding which of the almost in

Exe file

2005-06-09 Thread Philip Seeger
Hi @ll I'm sorry for that newbie question but how can I compile a program (a .py file) to an executable file? -- Philip Seeger -- http://mail.python.org/mailman/listinfo/python-list

Re: Exe file

2005-06-10 Thread Philip Seeger
For easier distribution. Otherwise the client computer had to have Python installed. Philip "Peter Hansen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Philip Seeger wrote: >> I'm sorry for that newbie question but how can I compile a

Re: c/c++ extensions and help()

2005-07-31 Thread Philip Austin
Robert Kern <[EMAIL PROTECTED]> writes: > Lenny G. wrote: >> Is there a way to make a c/c++ extension have a useful method >> signature? Right now, help(myCFunc) shows up like: >> myCFunc(...) >> description of myCFunc >> I'd like to be able to see: >> myCFunc(myArg1, myArg2) >> description o

Re: void * C array to a Numpy array using Swig

2006-01-12 Thread Philip Austin
"Travis E. Oliphant" <[EMAIL PROTECTED]> writes: > Krish wrote: > Yes, you are right that you need to use typemaps. It's been awhile > since I did this kind of thing, but here are some pointers. Also, there's http://geosci.uchicago.edu/csc/numptr -- http://mail.python.org/mailman/listinfo/p

Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Philip Smith
Just to announce that I have posted an experimental version of MPQS which I am hoping those of a mathematical turn of mind would care to test, comment on and maybe contribute to. There is work to do but it performs very well. The package is available via FTP at http://www.pythonstuff.pwp.bluey

Re: Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Philip Smith
Whoops Should have been http://www.python.pwp.blueyonder.co.uk/ Thanks Phil "Philip Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Just to announce that I have posted an experimental version of MPQS which > I am hoping those of a mathematical turn

Pyrex newbie question

2006-06-04 Thread Philip Smith
Just starting to use pyrex on windows. Using pyrex version 0.9.3.1.win32 Using Activestate Python 2.4.3.12 Using Mingw compiler When I try to run the pyrex demo it fails with a message: "undefined reference to '_imp__Py_NoneStruct' " Anyone know why? -- http://mail.python.org/mailman/list

Re: httplib raises ValueError reading chunked content

2006-03-08 Thread Philip Semanchuk
On Mar 8, 2006, at 8:32 PM, Etienne Desautels wrote: > > Hi Philip, > >> Hi all, >> Has anyone ever seen Python 2.4.1's httplib choke when reading chunked >> content? > > Yes, it's a know bug. See for yourself: > https://sourceforge.net/tracker/?

Re: Python advocacy in scientific computation

2006-03-09 Thread Philip Austin
Michael McNeil Forbes <[EMAIL PROTECTED]> writes: > > I find that version control (VC) has many advantages for > scientific research (I am a physicist). > Greg Wilson also makes that point in this note: http://www.nature.com/naturejobs/2005/050728/full/nj7050-600b.html Where he describes his exc

ctypes/libffi for Intel based Macintosh

2006-03-29 Thread philip . kania
Can someone tell me where I can download a version of ctypes/libffi that will work on a Intel based Macintosh? I'm running Mac OS X 10.4.5 and the ActiveState Python 2.4.2 distribution. I've tried building libffi 1.20 which came with ctypes 0.9.9.3 and got a message from the libffi configure scr

Re: merits of Lisp vs Python

2006-12-11 Thread philip . armitage
Juan R. wrote: > [EMAIL PROTECTED] ha escrito: > > - Lisp is hard to learn (because of all those parenthesis) > > I cannot understand why. It is like if you claim that packaging things > in boxes is difficult to learn. > > HTML and XML have more brackets than LISP (usually double) for > structuring

Re: merits of Lisp vs Python

2006-12-15 Thread philip . armitage
Paul Rubin wrote: > André Thieme <[EMAIL PROTECTED]> writes: > which isn't purely a matter of token count. And if (+ 2 3) were > really as easy to read as 2+3, mathematics would have been written > that way all along. Maybe I am a "mutant" as Ken suggests but while mathematicians may think in te

Re: Is there a way to push data into Ical from Python ?

2006-12-18 Thread Philip Austin
"The Night Blogger" <[EMAIL PROTECTED]> writes: > Is there a way to pull & push data into (Apple Mac OS X Calendar) Ical from > Python ? > see: http://vobject.skyhouseconsulting.com/ -- regards, Phil -- http://mail.python.org/mailman/listinfo/python-list

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread Philip Austin
[EMAIL PROTECTED] writes: >> This is the .NET 11 SDK, I belive it includes the 2003 compiler (*): > > Last time I checked the .NET SDK they had the C# compiler in there, but > not the C++ optimizing 2003 compiler. Might be wrong though I just downloaded and installed this, and see a directory