ANN: Cerridwen 1.0c4 (initial release)

2014-05-12 Thread leslie . polzer
Dear Python friends, today I'm proud to be ANNOUNCING: The initial release of a new package, named Cerridwen (1.0c4). PyPI entry: https://pypi.python.org/pypi/cerridwen What gives? The author perceives a lack of modern open source software providing high quality planetary data that is sui

Re: Using threads for audio computing?

2014-05-12 Thread lgabiot
Le 12/05/14 08:13, Stefan Behnel a écrit : This sounds like a use case for double buffering. Use two buffers, start filling one. When it's full, switch buffers, start filling the second and process the first. When the second is full, switch again. Note that you have to make sure that the process

Re: parsing multiple root element XML into text

2014-05-12 Thread Peter Otten
Percy Tambunan wrote: > On Friday, May 9, 2014 4:02:42 PM UTC+7, Chris Angelico wrote: >> On Fri, May 9, 2014 at 6:59 PM, Percy Tambunan >> wrote: >> >> > Hai, I would like to parse this multiple root element XML >> >> >> >> Easy fix might be to wrap it in and , which will give >> >> you a

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Alain Ketterlin
Mark H Harris writes: > On 5/11/14 12:05 PM, Alain Ketterlin wrote: >>> Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on >>> steroids. Its amazing as a dynamic language, and its fast, like >>> lightning fast as well as multiprocessing (parallel processing) at its >>> core. Its

Re: Plotting multiple datasets with gnuplot

2014-05-12 Thread s . c . wouters
On Friday, October 9, 2009 12:12:54 PM UTC+2, Gabriel Genellina wrote: > En Fri, 09 Oct 2009 06:36:45 -0300, Rob Garrett > escribiï¿oe: > > > I'm trying to get gnuplot to display multiple data series on a single > > plot using gnuplot in python. I've searched around and haven't found > > a sol

Re: Fortran

2014-05-12 Thread Mark Lawrence
On 12/05/2014 03:28, Steven D'Aprano wrote: On Mon, 12 May 2014 01:27:17 +0100, Mark Lawrence wrote: On 12/05/2014 00:51, Steven D'Aprano wrote: Cars are standardized -- there are basically two types, manuals and automatics. Sadly they can still go wrong due to modern engineering practices

Re: Using threads for audio computing?

2014-05-12 Thread lgabiot
Le 12/05/14 10:14, lgabiot a écrit : So if I follow you, if the Pyaudio part is "Non-blocking" there would be a way to make it work without the two threads things. I'm back to the Pyaudio doc, and try to get my head around the callback method, which might be the good lead. So far, if I understa

Re: Error while calling round() from future.builtins

2014-05-12 Thread Preethi
On Saturday, May 10, 2014 5:26:56 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 10 May 2014 04:39:05 -0700, Preethi wrote: > > > > > Hi, > > > > > > I am new to python. I am getting an error "AttributeError: type object > > > 'Decimal' has no attribute 'from_float'" when I run the following

Re: PyPy updated

2014-05-12 Thread km
I tried compiling pandas on pypy 2.3 but it gave error as follows numpy/core/src/multiarray/scalarapi.c:742:16: error: 'PyUnicodeObject' has no member named 'str' uni->str[length] = 0; ^ numpy/core/src/multiarray/scalarapi.c:743:16: error: 'PyUnicodeObject' has no m

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 11/05/14 08:56, Ross Gayler wrote: It looks to me as though 32 and 64 bit versions of Python on 64 bit Windows are both really 32 bit Python, differing only in how they interact with Windows. No! Pointers are 64 bit, Python integers (on Python 2.x) are 32 bit. Microsoft decided to use a 32

Re: Fortran

2014-05-12 Thread Grant Edwards
On 2014-05-12, Steven D'Aprano wrote: > On Mon, 12 May 2014 00:51:01 +0100, MRAB wrote: >> On 2014-05-12 00:15, Steven D'Aprano wrote: >>> The F and J keys have "F" and "J" printed on them instead of "G" and >>> "K". They're also in slightly different positions, offset one position >>> to the lef

Re: Fortran

2014-05-12 Thread alister
On Sun, 11 May 2014 20:14:14 -0400, Roy Smith wrote: > In article , > MRAB wrote: > >> On 2014-05-12 00:15, Steven D'Aprano wrote: >> > On Sun, 11 May 2014 14:43:19 -0400, Roy Smith wrote: >> > >> >> In article , >> >> Chris Angelico wrote: >> >> >> >>> Some things are more standardized than

Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark Lawrence
This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it would make a rather pleasant change from interminable threads about names vs values vs variables vs objects. -- My fellow Pythonistas, ask not what our lang

a better way to operate svn with python(better than pysvn)?

2014-05-12 Thread xs . nepaul
-- https://mail.python.org/mailman/listinfo/python-list

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
Hi Ian, thank you for your help. Yes that is the book by Vineeth J Nair. At the top of page 12, at step 1 it says : 1.Download the latest tarball from https://pypi.python.org/packages/source/b/beautifulsoup4/. So yes, the version the book is dealing with is beautiful soup 4. I am using Pyhon 2

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
The version of Python the book seems to be referring to is 2.7, re: bottom of page 10- 'Pick the Path variable and add the following section to the Path variable: ;C:\PythonXY for example C:\Python 27' The version of Beautiful Soup seems to be Beautiful Soup 4 as at the top of page 12 it states

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
Thank you for your advice. I did buy a book on Python, 'Hello Python' but the code in it wouldn't run, so I returned it to the shop for a refund. I am going to visit the local library to see if they have any books on Python. I am familiar with Java and Pascal, and looking at a few You tubes on t

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
Dear Ian, The book does recommend to use Python 2.7 (see bottom line of page 10). The book also recommends to use Beautiful Soup 4. You are right that in that I have placed the unzipped BS4 folder within a folder, and I therefore removed the contents of the inner folder and transferred them to

Re: NumPy, SciPy, & Python 3X Installation/compatibility issues

2014-05-12 Thread Joseph Martinot-Lagarde
Le 10/05/2014 19:07, esaw...@gmail.com a écrit : Hi All-- Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have been reading about NumPy and SciPy and could no

Re: How can this assert() ever trigger?

2014-05-12 Thread Joseph Martinot-Lagarde
Le 10/05/2014 17:24, Albert van der Horst a écrit : I have the following code for calculating the determinant of a matrix. It works inasfar that it gives the same result as an octave program on a same matrix. / def determinant( ma

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-12 Thread scottcabit
On Friday, May 9, 2014 8:12:57 PM UTC-4, Steven D'Aprano wrote: > Good: > > > > fStr = re.sub(b'‒', b'-', fStr) > Doesn't work...the document has been verified to contain endash and emdash characters, but this does NOT replace them. > > > Better: > > > > fStr = fStr.replace(b'

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread alister
On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: > This was *NOT* written by our resident unicode expert > http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ > > Posted as I thought it would make a rather pleasant change from > interminable threads about names vs values vs variab

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Ian Kelly
On Mon, May 12, 2014 at 11:47 AM, alister wrote: > On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: > >> This was *NOT* written by our resident unicode expert >> http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ >> >> Posted as I thought it would make a rather pleasant change fro

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
I did download the latest version of Beautiful Soup 4 from the download site, as the book suggested. -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread MRAB
On 2014-05-12 19:31, Ian Kelly wrote: On Mon, May 12, 2014 at 11:47 AM, alister wrote: On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it would make

Re: NumPy, SciPy, & Python 3X Installation/compatibility issues

2014-05-12 Thread Sturla Molden
wrote: > 4.In the long run, would it be better to use UNIX instead of Windows, if > I were to use Python for all of my research? > Thanks in advance. EK For scientific computing, a UNIX or Linux system is clearly preferable. Most of the scientific computing software is built around the UNIX

Re: [Twisted-web] Twisted 14.0.0 Release Announcement

2014-05-12 Thread Glyph
On May 12, 2014, at 4:07 AM, HawkOwl wrote: > Twisted Agent can also now do HTTPS hostname verification. I feel that it's important to note that Twisted Web's client Agent *does* do HTTPS hostname verification by default; you don't need to turn it on ;). -glyph-- https://mail.python.org/mail

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Ian Kelly
On Mon, May 12, 2014 at 10:35 AM, Simon Evans wrote: > Dear Ian, > The book does recommend to use Python 2.7 (see bottom line of page 10). > The book also recommends to use Beautiful Soup 4. > You are right that in that I have placed the unzipped BS4 folder within a > folder, and I therefore remo

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Ian Kelly
On Mon, May 12, 2014 at 1:42 PM, MRAB wrote: > How about checking sys.stdin.mode and sys.stdout.mode? Seems to work, but I notice that the docs only define the mode attribute for the FileIO class, which sys.stdin and sys.stdout are not instances of. -- https://mail.python.org/mailman/listinfo/py

SQLAlchemy - web framework ?

2014-05-12 Thread flebber
If I want to use SQLAlchemy as my ORM what would be the best option for a web framework? It appears the general advice regarding Django is to do it the Django way and use the django ORM and change it out for SQLAlchemy. That to me limited knowledge leaves flask, pyramid and turbogears 2. So if

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 12/05/14 15:42, Sturla Molden wrote: - A one-dimensional NumPy array with dtype np.float64 can keep 16 GB of data before a 32 bit index is too small and Python starts to use long. A two-dimensional NumPy array with dtype np.float64 can keep 256 GB of data before a 32 bit index is too small.

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 4:31 AM, Ian Kelly wrote: > Just because his code sucks doesn't mean he's > wrong about the state of Unicode and UNIX in Python 3. Uhm... I think wrongness of code is generally fairly indicative of wrongness of thinking :) If I write a rant about how Python's list type suc

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 11/05/14 08:56, Ross Gayler wrote: Is that true?I have spent a couple of hours searching for a definitive description of the difference between the 32 and 64 bit versions of Python for Windows and haven't found anything. Why do you care if a Python int object uses 32 or 64 bits internally?

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread MRAB
On 2014-05-13 00:41, Sturla Molden wrote: On 12/05/14 15:42, Sturla Molden wrote: - A one-dimensional NumPy array with dtype np.float64 can keep 16 GB of data before a 32 bit index is too small and Python starts to use long. A two-dimensional NumPy array with dtype np.float64 can keep 256 GB of

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 10:05 AM, Sturla Molden wrote: > On 11/05/14 08:56, Ross Gayler wrote: > >> Is that true?I have spent a couple of hours searching for a definitive >> description of the difference between the 32 and 64 bit versions of >> Python for Windows and haven't found anything. > > >

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 13/05/14 02:09, Chris Angelico wrote: Sometimes you just want to confirm. :) Or maybe you want your program to be able to detect which it's on. There are ways of doing both, but sys.maxint isn't one of them, as it's specific to the int->long promotion of Py2. The OPs main mistake, I guess,

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Iuri
I don't know what exactly you mean with "wanted to not build it all myself", but Flask is great with SQLAlchemy. You have the Flask-SQLAlchemy extension and it has a lot of other integrations, like Flask-Admin. You don't have to fear flask to bigger projects. To be honest, I prefer it instead of D

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Ben Finney
flebber writes: > If I want to use SQLAlchemy as my ORM what would be the best option > for a web framework? > > It appears the general advice regarding Django is to do it the Django > way and use the django ORM and change it out for SQLAlchemy. You don't say any more about this. Have you evalua

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Roy Smith
In article <17149f49-bb71-4c97-9d07-d80766b93...@googlegroups.com>, flebber wrote: > If I want to use SQLAlchemy as my ORM what would be the best option for a web > framework? > > It appears the general advice regarding Django is to do it the Django way and > use the django ORM and change it

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Steven D'Aprano
On Mon, 12 May 2014 17:47:48 +, alister wrote: > On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: > >> This was *NOT* written by our resident unicode expert >> http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ >> >> Posted as I thought it would make a rather pleasant change

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Sayth Renshaw
I am saying 'do it myself' in that with flask that provide a small base and then all functionality is added by me directly, with the assistance of community modules. Compared to Django whose developers have created an integrated set of defaults with more functionality standard, which is good if yo

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 11:18 AM, Steven D'Aprano wrote: > Reading Armin's post, I think that all that is needed to simplify his > Python 3 version is: > > - have a bytes version of sys.argv (bargv? argvb?) and read > the file names from that; argb? :) > - have a simple way to write bytes to s

Re: a better way to operate svn with python(better than pysvn)?

2014-05-12 Thread alex23
On 13/05/2014 1:16 AM, xs.nep...@gmail.com wrote: > ... Rather than just send an empty message, why not explain what you don't like about pysvn so that someone could provide more pertinant advice? But since you didn't: https://pypi.python.org/pypi?%3Aaction=search&term=svn&submit=search -- h

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark H Harris
On 5/12/14 8:18 PM, Steven D'Aprano wrote: Unicode is hard, not because Unicode is hard, but because of legacy problems. Yes. To put a finer point on that, Unicode (which is only a specification constantly being improved upon) is harder to implement when it hasn't been on the design board fr

Re: a better way to operate svn with python(better than pysvn)?

2014-05-12 Thread Mark H Harris
On 5/12/14 10:16 AM, xs.nep...@gmail.com wrote: > {nothing} huh? -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark Lawrence
On 13/05/2014 02:18, Steven D'Aprano wrote: On Mon, 12 May 2014 17:47:48 +, alister wrote: On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it wou

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-12 Thread Rustom Mody
On Monday, May 12, 2014 11:05:53 PM UTC+5:30, scott...@gmail.com wrote: > On Friday, May 9, 2014 8:12:57 PM UTC-4, Steven D'Aprano wrote: > > fStr = fStr.replace(b'‒', b'-') > >Still doesn't work > > > > Best: > > > > > > # Untested > > > > fStr = re.sub(b'&#x(201[2-5])|(2E3[A

Simple Function Decorator Sample Snippet

2014-05-12 Thread Mark H Harris
hi folks, I've come up with a simple snippet that intends to explain the concept of decorations without an article (for on app help), while being succinct and concise, while not being overly complicated. Does this work? I have another one coming for args, similar, if this works... comments

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Rustom Mody
On Tuesday, May 13, 2014 6:48:35 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 12 May 2014 17:47:48 +, alister wrote: > > > Surely those example programs are not the pythonoic way to do things or > > am i missing something? > > > > Feel free to show us your version of "cat" for Python then.

Re: SQLAlchemy - web framework ?

2014-05-12 Thread flebber
Roy.that is interesting that you can use mongoengine. Recent google results such as seem to assert there are a lot of inherent risk in swapping out components, though I may be misinterpreting it. http://www.slideshare.net/daikeren/tradeoffs-of-replacing-core-components Sayth -- https://mail.

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Mark H Harris
On 5/12/14 3:44 AM, Alain Ketterlin wrote: multiple-dispatch (i.e., dynamically testing types, converting to a common type, and selecting the version of sqrt to use). That's probably more than the time it takes to actually perform the computation, a bit like what happens with x+y on integers with

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark H Harris
On 5/13/14 12:10 AM, Rustom Mody wrote: I think the most helpful way forward is to accept two things: a. Unicode is a headache b. No-unicode is a non-option QOTW(so far...) -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Steven D'Aprano
On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: > there has to be a value add for scientists to move away from R or > Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well (its > fast too), and there are zillions of lines of code cranking away on huge > linear arrays. Enter

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Gene Heskett
On Tuesday 13 May 2014 01:39:06 Mark H Harris did opine And Gene did reply: > On 5/13/14 12:10 AM, Rustom Mody wrote: > > I think the most helpful way forward is to accept two things: > > a. Unicode is a headache > > b. No-unicode is a non-option > > QOTW(so far...) But its early yet, only Tu

Re: Simple Function Decorator Sample Snippet

2014-05-12 Thread Steven D'Aprano
On Mon, 12 May 2014 23:41:18 -0500, Mark H Harris wrote: > hi folks, I've come up with a simple snippet I don't think that this idea is original to you :-) I'm pretty sure many people have come up with the idea of a decorator that just announces when it runs and when it is called. I know I hav

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 3:48 PM, Steven D'Aprano wrote: > Self-modifying code is a nightmare inside the head of a Lovecraftian > horror. There's a reason why almost the only people still using self- > modifying code are virus writers, and the viruses they create are > notorious for being buggy. H

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Mark H Harris
On 5/13/14 12:48 AM, Steven D'Aprano wrote: On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: there has to be a value add for scientists to move away from R or Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well (its fast too), and there are zillions of lines of code cran

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Ben Finney
Gene Heskett writes: > On Tuesday 13 May 2014 01:39:06 Mark H Harris did opine > > QOTW(so far...) > > But its early yet, only Tuesday & its just barely started... :) Says who? For some of us, Tuesday is approaching sunset. (It's always a good day to remind people that the rest of the worl

Re: Simple Function Decorator Sample Snippet

2014-05-12 Thread Mark H Harris
On 5/13/14 12:54 AM, Steven D'Aprano wrote: I don't think that this idea is original to you :-) I'm pretty sure many people have come up with the idea of a decorator that just announces when it runs and when it is called. I know I have :-) oh, absolutely... every piece of that thing comes f

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Rustom Mody
On Tuesday, May 13, 2014 11:09:06 AM UTC+5:30, Mark H. Harris wrote: > On 5/13/14 12:10 AM, Rustom Mody wrote: > > > I think the most helpful way forward is to accept two things: > > a. Unicode is a headache > > b. No-unicode is a non-option > > > QOTW(so far...) I said that getting unicode

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 4:03 PM, Ben Finney wrote: > (It's always a good day to remind people that the rest of the world > exists.) Ironic that this should come up in a discussion on Unicode, given that Unicode's fundamental purpose is to welcome that whole rest of the world instead of yelling "L

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread alex23
On 13/05/2014 11:39 AM, Chris Angelico wrote: On Tue, May 13, 2014 at 11:18 AM, Steven D'Aprano wrote: - have a bytes version of sys.argv (bargv? argvb?) and read the file names from that; argb? :) I tried and failed to come up with an "argy bargy" joke here so decided to go for a meta-

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Gene Heskett
On Tuesday 13 May 2014 01:48:43 Steven D'Aprano did opine And Gene did reply: > On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: > > there has to be a value add for scientists to move away from R or > > Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well > > (its fast too),

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 4:25 PM, alex23 wrote: > On 13/05/2014 11:39 AM, Chris Angelico wrote: >> >> On Tue, May 13, 2014 at 11:18 AM, Steven D'Aprano >> wrote: >>> >>> - have a bytes version of sys.argv (bargv? argvb?) and read >>>the file names from that; >> >> >> argb? :) > > > I tried and

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark H Harris
On 5/13/14 1:18 AM, Chris Angelico wrote: instead of yelling "LALALALALA America is everything" and pretending that ASCII, or Latin-1, or something, is all you need. ... it isn't? LALALALALALALALALA :)) -- https://mail.python.org/mailman/listinfo/python-list