Re: What happened to __cmp__() in Python 3.x?

2009-08-17 Thread Xavier Ho
On Sun, Aug 16, 2009 at 10:33 PM, Mark Lawrence wrote: > > I wasn't discussing __cmp__, I was referring to the quote by Chris Rebert > from the Python docs regarding the rich comparison methods, a discrepancy > between the documentation and the implementation as noted in the link that I > gave, an

Re: get the pause status from amarok 2.1

2009-08-17 Thread Sleepy Cabbage
On Sat, 15 Aug 2009 09:25:19 +, Sleepy Cabbage wrote: > On Fri, 14 Aug 2009 12:55:07 +0200, Diez B. Roggisch wrote: > >> Sleepy Cabbage schrieb: >>> As the title says, I'm trying to find a way to get the pause status >>> from amarok 2.1. >>> >>> I'm running kubuntu 9.04 with kde 4.2.2, pytho

Re: get the pause status from amarok 2.1

2009-08-17 Thread Sleepy Cabbage
On Mon, 17 Aug 2009 07:23:55 +, Sleepy Cabbage wrote: > On Sat, 15 Aug 2009 09:25:19 +, Sleepy Cabbage wrote: > >> On Fri, 14 Aug 2009 12:55:07 +0200, Diez B. Roggisch wrote: >> >>> Sleepy Cabbage schrieb: As the title says, I'm trying to find a way to get the pause status from

Re: python doc available in emacs info format?

2009-08-17 Thread Xah Lee
info format for Xah Lee writes: > in programing elisp in emacs, i can press “Ctrl+h f” to lookup > the doc for the function under cursor. is there such facility > when coding in perl, python, php? On Dec 11 2008, 6:56 am, Matthias wrote: > Yes, try C-h S (or similarly S): > (info-looku

Re: zip codes

2009-08-17 Thread Aahz
In article <35833d36-2fdc-4ed8-8142-604af3c88...@k6g2000yqn.googlegroups.com>, Shailen wrote: > >Is there any Python module that helps with US and foreign zip-code >lookups? I'm thinking of something that provides basic mappings of zip >to cities, city to zips, etc. Since this kind of information

zip codes

2009-08-17 Thread Shailen
Is there any Python module that helps with US and foreign zip-code lookups? I'm thinking of something that provides basic mappings of zip to cities, city to zips, etc. Since this kind of information is so often used for basic user-registration, I'm assuming functionality of this sort must be availa

Re: Python- javascript

2009-08-17 Thread Michel Claveau - MVP
Hi! If you are under Windows, you can drive IE, for indirect drive the web-pages. In this case, you can then interact with pages & the javascript's scripts included. For more, see Pywin32, Pamie, Pxie, etc. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-l

Re: zip codes

2009-08-17 Thread Martin P. Hellwig
Shailen wrote: Is there any Python module that helps with US and foreign zip-code lookups? I'm thinking of something that provides basic mappings of zip to cities, city to zips, etc. Since this kind of information is so often used for basic user-registration, I'm assuming functionality of this so

Re: Xah's Edu Corner: The importance of syntax & notations.

2009-08-17 Thread John Nagle
Xah Lee wrote: Xah's Edu Corner: The importance of syntax & notations. http://www.stephenwolfram.com/publications/recent/mathml/mathml_abstract.html this article should teach the coding sophomorons and computer “science” idiotic authors who harbor the notion that syntax is not important, picked

Re: zip codes

2009-08-17 Thread Sjoerd Mullender
Martin P. Hellwig wrote: > Shailen wrote: >> Is there any Python module that helps with US and foreign zip-code >> lookups? I'm thinking of something that provides basic mappings of zip >> to cities, city to zips, etc. Since this kind of information is so >> often used for basic user-registration,

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-17 Thread Hendrik van Rooyen
On Sunday 16 August 2009 15:55:31 Grant Edwards wrote: > On 2009-08-15, Hendrik van Rooyen wrote: > > I am still confused about pyserial and serial - I found serial > > in my distribution library, (on the SuSe machine, not on the > > 2.5 in Slackware) but I had to download pyserial. > > That's ve

Re: Xah's Edu Corner: The importance of syntax & notations.

2009-08-17 Thread Xah Lee
2009-08-17 On Aug 16, 10:32 pm, Xah Lee wrote: > Personally, particular interesting info i've learned is that, for all > my trouble in the past decade expressing problems of traditional math > notation, i learned from his article this single-phrase summary: > “traditional math notation lacks a gr

XML parsing with python

2009-08-17 Thread inder
Hi All, I am new to xml . I need to parse the xml file . After reading and browsing on the web , I could get much help . I guess SAX would be better suited for my requirement . Could some juct provide me a sample python code so that I can execute it and see how the parsing actually happens . Le

Re: GUI interface builder for python

2009-08-17 Thread Hendrik van Rooyen
On Monday 17 August 2009 07:59:02 l...@d@n wrote: > Which is the best GUI interface builder with drag and drop > capabilities. > I am using Ubuntu GNU/Linux. > Please help me. > Thank you. Have a look at Boa Constructor. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: XML parsing with python

2009-08-17 Thread Stefan Behnel
inder wrote: > I am new to xml . I need to parse the xml file . After reading and > browsing on the web , I could get much help . > > I guess SAX would be better suited for my requirement . That's a common misconception. > Could some juct provide me a sample python code so that I can execute >

Re: sub-list extraction, logical indexation

2009-08-17 Thread Diez B. Roggisch
Pierre wrote: > Hello Everyone, > > I would like to know if it is possible to extract a sub-list from a > list ? > > typically if : > > L =[[1, 2, 3],[4, 5, 6],[3] ] > > How to extract easily the elements 0 and 2 of L in order to get : > > L2 =[[1, 2, 3],[3] ] > > Moreover, I would like to k

Re: zip codes

2009-08-17 Thread MRAB
Sjoerd Mullender wrote: Martin P. Hellwig wrote: Shailen wrote: Is there any Python module that helps with US and foreign zip-code lookups? I'm thinking of something that provides basic mappings of zip to cities, city to zips, etc. Since this kind of information is so often used for basic user-

Re: sub-list extraction, logical indexation

2009-08-17 Thread MRAB
Diez B. Roggisch wrote: Pierre wrote: Hello Everyone, I would like to know if it is possible to extract a sub-list from a list ? typically if : L =[[1, 2, 3],[4, 5, 6],[3] ] How to extract easily the elements 0 and 2 of L in order to get : L2 =[[1, 2, 3],[3] ] Moreover, I would like to kn

Uninstalling mac python2.5 to install python2.6

2009-08-17 Thread Farhan Sheikh
Dear all, i originally had python2.5 on my mac at the univeristy and had to get 2.6 to get NEST and pyNN to work together. however now as those are now installed, i had to install numpy. As i installed numpy, it only installed its directories into the python2.5 folders and as i am new to

Re: python doc available in emacs info format?

2009-08-17 Thread Colin S. Miller
Xah Lee wrote: btw, is there still info format for python doc? i feel kinda sad that emacs info format has pretty much been deprecated over the past decade. About a decade ago, you still will see now and then people asking for emacs info format of docs (was the days of perl). Today, one don't he

Re: wxFormBuilder finally supports wxPython

2009-08-17 Thread sturlamolden
On 16 Aug, 20:32, Nobody wrote: > Is there a reason to prefer code over XRC? There is less boilerplate code required. E.g. event handlers are bound in the GUI builder. You can access GUI objects as attributes of your Python class. You don't need to request them from an xml. But apart from that,

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 02:12 am, pavlovevide...@gmail.com wrote: On Aug 16, 3:35�pm, sturlamolden wrote: On 16 Aug, 14:57, Dennis Lee Bieber wrote: >         Well, the alternative would be to have two keywords for looping: one > for your "simple" incrementing integer loop, and another for a loop that > oper

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 01:53 am, pavlovevide...@gmail.com wrote: On Aug 16, 6:28�pm, exar...@twistedmatrix.com wrote: On 01:23 am, benjamin.kap...@case.edu wrote: >On Sun, Aug 16, 2009 at 6:35 PM, sturlamolden >wrote: >>A compiler could easily recognise a statement like >>� for i in range(n): >>as a simple int

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 01:44 am, http wrote: exar...@twistedmatrix.com writes: Although I think PyPy also recognizes this case and makes it as efficient as using xrange, and does so without breaking any rules. How can pypy possibly know that the user hasn't assigned some other value to "range"? It doesn't reall

Re: GUI interface builder for python

2009-08-17 Thread sturlamolden
On 16 Aug, 22:59, "l...@d@n" wrote: > Which is the best GUI interface builder with drag and drop > capabilities. > I am using Ubuntu GNU/Linux. > Please help me. > Thank you. wxFormBuilder -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI interface builder for python

2009-08-17 Thread sturlamolden
On 16 Aug, 22:59, "l...@d@n" wrote: > Which is the best GUI interface builder with drag and drop > capabilities. > I am using Ubuntu GNU/Linux. PyGTK --> GLADE xwPython --> wxFormBuilder PyQt --> QtDesigner -- http://mail.python.org/mailman/listinfo/python-list

Re: sub-list extraction, logical indexation

2009-08-17 Thread Vlastimil Brom
2009/8/17 MRAB : > Diez B. Roggisch wrote: >> >> Pierre wrote: >> >>> Hello Everyone, >>> >>> I would like to know if it is possible to extract a sub-list from a >>> list ? >>> >>> typically if : >>> >>> L =[[1, 2, 3],[4, 5, 6],[3] ] >>> >>> How to extract easily the elements 0 and 2 of L in order

Re: ignored test cases in unittest

2009-08-17 Thread David House
2009/8/16 Terry : > Thanks for the solutions. I think the decorator idea is what I'm look > for:-) Note that the unittest module now supports the `skip' and `expectedFailure' decorators, which seem to describe some of the solutions here. See http://docs.python.org/3.1/library/unittest.html#skipp

Re: callable virtual method

2009-08-17 Thread Bruno Desthuilliers
Jean-Michel Pichavant a écrit : (snip) Sometimes the base is doing cool stuff but incomplete stuff which requires knowledge only hold by the sub class. In my case the interface is a high level interface for a software that can run on multiple hardware platforms. Only the sub class has knowledg

Re: callable virtual method

2009-08-17 Thread Bruno Desthuilliers
Jean-Michel Pichavant a écrit : Scott David Daniels wrote: (snip) But there _is_ one moment when you can check those things, then avoid checking thereafter: object creation. So you can complicate your __init__ (or __new__) with those checks that make sure you instantiate only fully defined sub

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread sturlamolden
On 16 Aug, 19:12, Carl Banks wrote: > If you don't care about the dynamic stuff why don't you just use > Cython?  Or quit complaining and just use xrange. I think you are the only one complaining here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread MRAB
exar...@twistedmatrix.com wrote: On 02:12 am, pavlovevide...@gmail.com wrote: On Aug 16, 3:35�pm, sturlamolden wrote: On 16 Aug, 14:57, Dennis Lee Bieber wrote: > � � � � Well, the alternative would be to have two keywords for looping: one > for your "simple" incrementing integer loop, and

Re: zip codes

2009-08-17 Thread steven.oldner
On Aug 17, 5:21 am, MRAB wrote: > Sjoerd Mullender wrote: > > Martin P. Hellwig wrote: > >> Shailen wrote: > >>> Is there any Python module that helps with US and foreign zip-code > >>> lookups? I'm thinking of something that provides basic mappings of zip > >>> to cities, city to zips, etc. Since

Re: platform-specific overrides of functions and class methods (expanding on imputils demo code)

2009-08-17 Thread lkcl
thought that people might like to know: i found also that imputil, the standard python module, was lacking the necessary complexity in being a substitute for the standard __import__ function. the additions required were very simple: # note the addition of level=-1 which is ignored def _i

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Stefan Behnel
Carl Banks wrote: > On Aug 16, 3:35 pm, sturlamolden wrote: >> On 16 Aug, 14:57, Dennis Lee Bieber wrote: >> >>> Well, the alternative would be to have two keywords for looping: one >>> for your "simple" incrementing integer loop, and another for a loop that >>> operates over the elements

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Steven D'Aprano
On Sun, 16 Aug 2009 15:35:26 -0700, sturlamolden wrote: > On 16 Aug, 14:57, Dennis Lee Bieber wrote: > >>         Well, the alternative would be to have two keywords for >>         looping: one >> for your "simple" incrementing integer loop, and another for a loop >> that operates over the eleme

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Stefan Behnel
John Machin wrote: > On Aug 17, 8:35 am, sturlamolden wrote: > >> A compiler could easily recognise a statement like >>for i in range(n): >> as a simple integer loop. In fact, Cython is able to do this. > > Extremely easy, once users relinquish the right to replace built-in > "range" with th

Re: ignored test cases in unittest

2009-08-17 Thread Terry Yin
On Aug 17, 8:23 pm, David House wrote: > > Note that the unittest module now supports the `skip' and > `expectedFailure' decorators, which seem to describe some of the > solutions here. > > Seehttp:// docs.python.org/3.1/library/unittest.html#skipping-tests-and-e... > > -- > -David Yes, indeed! I'

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread David Robinow
On Sun, Aug 16, 2009 at 11:10 PM, Nobody wrote: > Java also has iterators; it's more a case of people coming from C and BASIC. > > Although, some of those may have come *through* Java without abandoning > old habits. You see the same thing with people coming from BASIC to C and > writing: > >      

off topic: google groups sucks?

2009-08-17 Thread Aaron Watters
Just a note. It seems that google groups is increasing the sucks coefficient. I search for things using "group search" for comp.lang.python and I get no results even though I know there are results from a few months or weeks ago. What is the best alternative for this kind of trawling? gmane? W

Re: off topic: google groups sucks?

2009-08-17 Thread jkn
On Aug 17, 3:05 pm, Aaron Watters wrote: > Just a note.  It seems that google groups is increasing the > sucks coefficient. > > I search for things using "group search" for comp.lang.python > and I get no results even though I know there are results from > a few months or weeks ago. There seems t

Re: httplib incredibly slow :-(

2009-08-17 Thread Chris Withers
i3dmaster wrote: Just wanted to check if you can try turning on the debug mode for httplib and see if you can read a bit more debug info on where the calls get hung. In your example, it would be conn.set_debuglevel(1) I had a look through the code this debug level controls and I don't see any

Re: off topic: google groups sucks?

2009-08-17 Thread Stefan Behnel
jkn wrote: > On Aug 17, 3:05 pm, Aaron Watters wrote: >> Just a note. It seems that google groups is increasing the >> sucks coefficient. >> >> I search for things using "group search" for comp.lang.python >> and I get no results even though I know there are results from >> a few months or weeks

Re: XML parsing with python

2009-08-17 Thread John Posner
Use the iterparse() function of the xml.etree.ElementTree package. http://effbot.org/zone/element-iterparse.htm http://codespeak.net/lxml/parsing.html#iterparse-and-iterwalk Stefan iterparse() is too big a hammer for this purpose, IMO. How about this: from xml.etree.ElementTree import E

Re: zip codes

2009-08-17 Thread Nigel Rantor
MRAB wrote: Sjoerd Mullender wrote: Martin P. Hellwig wrote: Shailen wrote: Is there any Python module that helps with US and foreign zip-code lookups? I'm thinking of something that provides basic mappings of zip to cities, city to zips, etc. Since this kind of information is so often used fo

Diversity in Python (was Re: Need cleanup advice for multiline string)

2009-08-17 Thread Aahz
In article <461cc6f1-fc23-4bc7-a719-6f29babf8...@o15g2000yqm.googlegroups.com>, Robert Dailey wrote: > >It's a figure of speech. And besides, why would I want programming >advice from a woman? lol. Thanks for the help. Well, I'm sorry to see this, it means I was wrong about the lack of sexism in

Re: Need cleanup advice for multiline string

2009-08-17 Thread Grant Edwards
On 2009-08-11, Bearophile wrote: > Robert Dailey: > >> This breaks the flow of scope. Would you guys solve this >> problem by moving failMsg into global scope? Perhaps through >> some other type of syntax? > > There are gals too here. Straying a bit OT, but I find this particular issue rather fas

Re: off topic: google groups sucks?

2009-08-17 Thread Aaron Watters
On Aug 17, 10:05 am, Aaron Watters wrote: > Just a note.  It seems that google groups is increasing the > sucks coefficient. I'm having better luck now using the advanced search option with queries like gadfly group:comp.lang.python which become http://groups.google.com/groups/search?q=g

Re: Need cleanup advice for multiline string

2009-08-17 Thread Jean-Michel Pichavant
Grant Edwards wrote: On 2009-08-11, Bearophile wrote: Robert Dailey: This breaks the flow of scope. Would you guys solve this problem by moving failMsg into global scope? Perhaps through some other type of syntax? There are gals too here. Straying a bit OT, but I find t

Re: Need cleanup advice for multiline string

2009-08-17 Thread Piet van Oostrum
> Simon Brunning (SB) wrote: >SB> 2009/8/11 Robert Dailey : >>> On Aug 11, 3:40 pm, Bearophile wrote: There are gals too here. >>> >>> It's a figure of speech. And besides, why would I want programming >>> advice from a woman? lol. Thanks for the help. >SB> Give the attitudes still pr

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Ethan Furman
Emmanuel Surleau wrote: Dr. Phillip M. Feldman wrote: [snip] def is_prime(n): for j in range(2,n): if (n % j) == 0: return False return True It seems as though Python is actually expanding range(2,n) into a list of numbers, even though this is incredibly wasteful of memory. There

Re: Diversity in Python (was Re: Need cleanup advice for multiline string)

2009-08-17 Thread Jean-Michel Pichavant
Aahz wrote: In article <461cc6f1-fc23-4bc7-a719-6f29babf8...@o15g2000yqm.googlegroups.com>, Robert Dailey wrote: It's a figure of speech. And besides, why would I want programming advice from a woman? lol. Thanks for the help. Well, I'm sorry to see this, it means I was wrong about t

Re: Diversity in Python (was Re: Need cleanup advice for multiline string)

2009-08-17 Thread Rami Chowdhury
You'll know that Python is sexist the day you'll find the title 'No women allowed' on the python main document page. Good God I hope you're being ironic. On Mon, 17 Aug 2009 10:23:39 -0700, Jean-Michel Pichavant wrote: Aahz wrote: In article <461cc6f1-fc23-4bc7-a719-6f29babf8...@o15g20

Re: flatten a list of list

2009-08-17 Thread Tim Cook
On Aug 16, 6:47 am, Terry wrote: > Hi, > > Is there a simple way (the pythonic way) to flatten a list of list? > rather than my current solution: > > new_list=[] > for l in list_of_list: >     new_list.extend(l) > > or, > > new_list=reduce(lambda x,y:x.extend(y), list_of_list) > > br, Terry Well,

Using a Callback Function - ftplib

2009-08-17 Thread seldan24
Hello, I'm utterly confused by something which is most likely trivial. I'm attempting to connect to an FTP server, retrieve a list of files, and store than in an array. I.e.: import ftplib ftp = ftplib.FTP(server) ftp.login(user, pass) ftp.cwd(conf['testdir']) ftp.retrlines('NLST ' + "testfile

Re: off topic: google groups sucks?

2009-08-17 Thread John Yeung
On Aug 17, 12:41 pm, Aaron Watters wrote: > I'm having better luck now using the advanced search option > with queries like > >    gadfly group:comp.lang.python > > The "search this group" feature still needs fixing, however. Thanks, Aaron, for confirming that it's not just me! I've been noticin

Re: Using a Callback Function - ftplib

2009-08-17 Thread David
Il Mon, 17 Aug 2009 10:43:33 -0700 (PDT), seldan24 ha scritto: > Hello, > > I'm utterly confused by something which is most likely trivial. I'm > attempting to connect to an FTP server, retrieve a list of files, and > store than in an array. I.e.: > > import ftplib > > ftp = ftplib.FTP(server

Re: Using a Callback Function - ftplib

2009-08-17 Thread seldan24
On Aug 17, 1:51 pm, David <71da...@libero.it> wrote: > Il Mon, 17 Aug 2009 10:43:33 -0700 (PDT), seldan24 ha scritto: > > > Hello, > > > I'm utterly confused by something which is most likely trivial.  I'm > > attempting to connect to an FTP server, retrieve a list of files, and > > store than in a

Re: Uninstalling mac python2.5 to install python2.6

2009-08-17 Thread Ned Deily
In article <83423f73-83da-436b-a3ba-e83cd61cd...@cs.stir.ac.uk>, Farhan Sheikh wrote: > i originally had python2.5 on my mac at the univeristy and had to get > 2.6 to get NEST and pyNN to work together. however now as those are > now installed, i had to install numpy. > > As i installed nump

Re: GUI interface builder for python

2009-08-17 Thread axl456
On Aug 17, 1:59 am, "l...@d@n" wrote: > Which is the best GUI interface builder with drag and drop > capabilities. > I am using Ubuntu GNU/Linux. > Please help me. > Thank you. boa is really nice.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-17 Thread Jon Harrop
Xah Lee wrote: > On Aug 12, 12:15 pm, Raymond Hettinger wrote: >> * The reason for implementing the key= parameter had nothing to do >> with limitations of Python's compiler. Instead, it was inspired by >> the >> decorate-sort-undecorate pattern. > > The decorate-sort-undecorate pattern is a com

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Carl Banks
On Aug 17, 4:40 am, exar...@twistedmatrix.com wrote: > On 02:12 am, pavlovevide...@gmail.com wrote: > > > > >On Aug 16, 3:35 pm, sturlamolden wrote: > >>On 16 Aug, 14:57, Dennis Lee Bieber wrote: > > >> >         Well, the alternative would be to have two keywords for > >>looping: one > >> > for

Embedding a python console inside a python application

2009-08-17 Thread Zorigaman
Hi, I am starting an application in which I would like to have some scripting functionality. It will obviously be done in Python. The thing is that I would like my scripts to have access to the rest of the application as an object it could manipulate. I made some research and I found the code modu

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-17 Thread J�rgen Exner
Jon Harrop wrote: >Xah Lee wrote: [...] Please do not feed this well-known troll. He is known to spew some remotely on-topic junk into a bunch of unrelated NGs and to enjoy the ensuing confusion. jue -- http://mail.python.org/mailman/listinfo/python-list

Re: XPath support?

2009-08-17 Thread kj
In Kev Dwyer writes: >On Sun, 16 Aug 2009 20:29:15 +, kj wrote: >> I'm looking for a XML parser that produces an object with full XPath >> support. What I've been using up to now, xml.etree.ElementTree, fails >> to support Xpath predicates, as in "sp...@eggs='3']/ham". >> >> What I'm try

Data visualization in Python

2009-08-17 Thread kj
I'm looking for a good Python package for visualizing scientific/statistical data. (FWIW, the OS I'm interested in is Mac OS X). The users of this package will be experimental biologists with little programming experience (but currently learning Python). (I normally visualize data using R or

Re: python doc available in emacs info format?

2009-08-17 Thread Bruce Stephens
"Colin S. Miller" writes: [...] > Ubuntu maintains a package search site, it is on > http://packages.ubuntu.com/ > > However, there seems to be no files named > python.*info (regexp) And yet there are info files in python2.5-doc: .

Re: Diversity in Python (was Re: Need cleanup advice for multiline string)

2009-08-17 Thread Paul Boddie
On 17 Aug, 19:23, Jean-Michel Pichavant wrote: > > Are you suggesting this list reject part of the community regarding its > sexual orientation, ethnicity, size, culture? If that was the case I'd > like to know about it. Careful: you probably meant to write "rejects", not "reject". That changes t

Re: Data visualization in Python

2009-08-17 Thread Grant Edwards
On 2009-08-17, kj wrote: > I'm looking for a good Python package for visualizing > scientific/statistical data. (FWIW, the OS I'm interested in > is Mac OS X). Both matplotlib and gnuplot-py can produce pretty good results with a minimum of effort: http://matplotlib.sourceforge.net/ http:/

Re: Data visualization in Python

2009-08-17 Thread Grant Edwards
On 2009-08-17, Grant Edwards wrote: > On 2009-08-17, kj wrote: > >> I'm looking for a good Python package for visualizing >> scientific/statistical data. (FWIW, the OS I'm interested in >> is Mac OS X). > > Both matplotlib and gnuplot-py can produce pretty good results > with a minimum of effort

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 06:32 pm, pavlovevide...@gmail.com wrote: On Aug 17, 4:40�am, exar...@twistedmatrix.com wrote: On 02:12 am, pavlovevide...@gmail.com wrote: >On Aug 16, 3:35�pm, sturlamolden wrote: >>On 16 Aug, 14:57, Dennis Lee Bieber wrote: >> > � � � � Well, the alternative would be to ha

comparing XML files to eachother

2009-08-17 Thread David Brochu
I need to compare one xml document to another to see if the content matches. Unfortunately, the formatting (spacing) and order of elements may change between files from run to run. I have looked into xml dom minidom but can't seem to find how to accomplish this. Does anyone know how I can do a comp

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Carl Banks
On Aug 17, 12:41 pm, exar...@twistedmatrix.com wrote: > There's a lot of things in Python that I don't strictly *need*.  That > doesn't mean that they wouldn't be welcome if I could have them. > Getting rid of the range/xrange dichotomy would improve things.  Yes, I > can work around it until the r

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread Carl Banks
On Aug 17, 12:59 pm, Carl Banks wrote: > The cost doesn't even remotely justify it. I mean, it doesn't even remotely justify the cost. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: zip codes

2009-08-17 Thread Piet van Oostrum
> Grant Edwards (GE) wrote: >GE> On 2009-08-16, Shailen wrote: >>> Thanks Martin and Aahz. Anyone know if zip code information is >>> copyrighted for the US? >GE> You can't copyright "information" as such. Only concrete >GE> expressions of information. A particular publication >GE> contai

Barcodes

2009-08-17 Thread Ronn Ross
My company needs a small inventory management app. Does python have any libraries to help with reading and writing bar codes? -- http://mail.python.org/mailman/listinfo/python-list

Re: off topic: google groups sucks?

2009-08-17 Thread Aaron Watters
On Aug 17, 1:44 pm, John Yeung wrote: > Thanks, Aaron, for confirming that it's not just me! yea, unfortunately this kind of thing happens in monopolies that have no viable competition anymore... Sometimes I begin to suspect that I'm seeing the results that I should want rather than the results I

Re: Data visualization in Python

2009-08-17 Thread jordilin
On 17 ago, 21:10, kj wrote: > I'm looking for a good Python package for visualizing > scientific/statistical data.  (FWIW, the OS I'm interested in is > Mac OS X). > > The users of this package will be experimental biologists with > little programming experience (but currently learning Python). >

Re: Barcodes

2009-08-17 Thread Emile van Sebille
On 8/17/2009 1:18 PM Ronn Ross said... My company needs a small inventory management app. Does python have any libraries to help with reading and writing bar codes? I've written bar code apps and python really doesn't enter into that part of things. Printers generally have bar code printing c

Strongly typed list

2009-08-17 Thread هاني الموصلي
Hello, I am using eclips for python and i am facing a problem. I have many classes with many properties and want a list of objects from one of my declared classes. The problem is:When i am accessing any item from the list, the IDE does not know it's type because in python we do not declare the vari

Re: Barcodes

2009-08-17 Thread Tim Chase
My company needs a small inventory management app. Does python have any libraries to help with reading and writing bar codes? I've written bar code apps and python really doesn't enter into that part of things. Printers generally have bar code printing capabilities so you just send the right es

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-17 Thread Paul Rubin
Jon Harrop writes: > You mean people use that pattern as a fast alternative in languages where > user-defined functions are very slow, like Python and Mathematica? It really doesn't matter whether the language is fast or slow--there are going to be applications where calling the comparison functi

Re: Need cleanup advice for multiline string

2009-08-17 Thread Carl Banks
On Aug 17, 10:03 am, Jean-Michel Pichavant wrote: > I'm no English native, but I already heard women/men referring to a > group as "guys", no matter that group gender configuration. It's even > used for group composed exclusively of women. Moreover it looks like a > *very* friendly form, so there

Re: Strongly typed list

2009-08-17 Thread Fabio Zadrozny
> Hello, I am using eclips for python and i am facing a problem. I have > many classes with many properties and want a list of objects from one > of my declared classes. The problem is:When i am accessing any item > from the list, the IDE does not know it's type because in python we do > not declar

Re: Diversity in Python (was Re: Need cleanup advice for multiline string)

2009-08-17 Thread Carl Banks
On Aug 17, 8:44 am, a...@pythoncraft.com (Aahz) wrote: > In article > <461cc6f1-fc23-4bc7-a719-6f29babf8...@o15g2000yqm.googlegroups.com>, > Robert Dailey   wrote: > > > > >It's a figure of speech. And besides, why would I want programming > >advice from a woman? lol. Thanks for the help. > > Well

Re: python doc available in emacs info format?

2009-08-17 Thread Xah Lee
> Please do not slag off a project if you want people to help; > it tends to put the goat up. a healthy community needs both positive comment as well as negative to grow. emacs's user base has been rotting off from i estimate more than 50% of programers to less that 1% today. the particular obse

Re: Diversity in Python (was Re: Need cleanup advice for multiline string)

2009-08-17 Thread Chris Rebert
On Mon, Aug 17, 2009 at 2:12 PM, Carl Banks wrote: > On Aug 17, 8:44 am, a...@pythoncraft.com (Aahz) wrote: >> In article >> <461cc6f1-fc23-4bc7-a719-6f29babf8...@o15g2000yqm.googlegroups.com>, >> Robert Dailey   wrote: >> >It's a figure of speech. And besides, why would I want programming >> >adv

Re: Need cleanup advice for multiline string

2009-08-17 Thread MRAB
Carl Banks wrote: On Aug 17, 10:03 am, Jean-Michel Pichavant wrote: I'm no English native, but I already heard women/men referring to a group as "guys", no matter that group gender configuration. It's even used for group composed exclusively of women. Moreover it looks like a *very* friendly fo

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-17 Thread Nathan Keel
Jon Harrop wrote: > Xah Lee wrote: >> On Aug 12, 12:15 pm, Raymond Hettinger wrote: >>> * The reason for implementing the key= parameter had nothing to do >>> with limitations of Python's compiler. Instead, it was inspired by >>> the >>> decorate-sort-undecorate pattern. >> >> The decorate-sort

Re: Embedding a python console inside a python application

2009-08-17 Thread Zorigaman
On 17 août, 20:46, Zorigaman wrote: > Hi, > > I am starting an application in which I would like to have some > scripting functionality. It will obviously be done in Python. The > thing is that I would like my scripts to have access to the rest of > the application as an object it could manipulate

Converting DD MM YYYY into YYYY-MM-DD?

2009-08-17 Thread Gilles Ganault
Hello, I need to convert DD MM dates into the MySQL-friendly -MM-DD, and translate the month name from literal French to its numeric equivalent (eg. "Janvier" into "01"). Here's an example: SELECT dateinscription, dateconnexion FROM membres LIMIT 1; 26 Mai 2007|17 Août 2009 - 09

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-17 Thread Raymond Hettinger
[Xah Lee] > This part i don't particular agree: > > > * The reason for implementing the key= parameter had nothing to do > > with limitations of Python's compiler.  Instead, it was inspired by > > the > > decorate-sort-undecorate pattern. > > The decorate-sort-undecorate pattern is a compiler limi

Re: Splitting a string into substrings of equal size

2009-08-17 Thread Gregor Lingl
Simon Forman schrieb: On Aug 14, 8:22 pm, candide wrote: Suppose you need to split a string into substrings of a given size (except possibly the last substring). I make the hypothesis the first slice is at the end of the string. A typical example is provided by formatting a decimal string with

Re: Need cleanup advice for multiline string

2009-08-17 Thread Ben Finney
Robert Dailey writes: > On Aug 11, 3:40 pm, Bearophile wrote: > > Robert Dailey: > > > This breaks the flow of scope. Would you guys solve this > > > problem by […] > > There are gals too here. > > It's a figure of speech. Indeed. When I use the term “guys” as a form of address, it's intended

Re: A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode

2009-08-17 Thread Jason Earl
Xah Lee writes: > Fresh out of the oven: > > • How to use and setup Emacs's whitespace-mode > http://xahlee.org/emacs/whitespace-mode.html > > Xah > ∑ http://xahlee.org/ Xah, I disagree with you about the usefulness of whitespace-mode's defaults, and I certainly disagree with the need to us

Re: Converting DD MM YYYY into YYYY-MM-DD?

2009-08-17 Thread Jonathan Gardner
On Aug 17, 3:26 pm, Gilles Ganault wrote: > Hello, > >         I need to convert DD MM dates into the MySQL-friendly > -MM-DD, and translate the month name from literal French to its > numeric equivalent (eg. "Janvier" into "01"). > > Here's an example: > > SELECT dateinscription, datecon

Re: Converting DD MM YYYY into YYYY-MM-DD?

2009-08-17 Thread Che M
On Aug 17, 6:26 pm, Gilles Ganault wrote: > Hello, > >         I need to convert DD MM dates into the MySQL-friendly > -MM-DD, and translate the month name from literal French to its > numeric equivalent (eg. "Janvier" into "01"). > > Here's an example: > > SELECT dateinscription, datecon

Re: Need cleanup advice for multiline string

2009-08-17 Thread John Machin
On Aug 12, 6:52 am, Robert Dailey wrote: > On Aug 11, 3:40 pm, Bearophile wrote: > > > Robert Dailey: > > > > This breaks the flow of scope. Would you guys solve this > > > problem by moving failMsg into global scope? > > > Perhaps through some other type of syntax? > > > There are gals too here.

Re: Converting DD MM YYYY into YYYY-MM-DD?

2009-08-17 Thread Jonathan Gardner
On Aug 17, 3:26 pm, Gilles Ganault wrote: >         I need to convert DD MM dates into the MySQL-friendly > -MM-DD, and translate the month name from literal French to its > numeric equivalent (eg. "Janvier" into "01"). > > Here's an example: > > SELECT dateinscription, dateconnexion FROM

Re: Strongly typed list

2009-08-17 Thread Jonathan Gardner
On Aug 17, 2:19 pm, هاني الموصلي wrote: > Please could you lead me to a way or a good IDE that makes developing > huge projects in python more easier than what i found.Now i am using > eclips. Actually it is very hard to remember all my classes methods > and attributes or copy and paste them each

  1   2   >